Red Hat Bugzilla – Bug 102412
/etc/profile.d/colorls.csh fails on test and does not read ~/.dircolors
Last modified: 2007-04-18 12:56:53 EDT
Description of problem:
[t]csh doesn't expand "~" if it's inside double-quotes.
I'm not sure if that's intended or a [t]csh bug,
but it causes /etc/profile.d/colorls.csh to fail on tests like this:
test -f "~/.dircolors.$TERM" && set COLORS="~/.dircolors.$TERM"
Removing the quotes fixes it. Replacing ~ by $HOME might do the trick as well.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. copy /etc/DIR_COLORS to ~/.dircolors
2. modify it
3. start a new terminal.
4. run ls
standard coloring of filenames
filenames colored according to the user's ~/.dircolors
Created attachment 102891 [details]
Don't quote ~ in colorls.csh
The quoting behavior is correct:
| Furthermore, all Substitutions (see below) except History substitution
| can be prevented by enclosing the strings (or parts of strings) in
| which they appear with single quotes or by quoting the crucial charac-
The attached patchs should be applied in coreutils.
Please try coreutils-5.2.1-23.
Fix confirmed in coreutils-5.93-7.2.