Bug 102412

Summary: /etc/profile.d/colorls.csh fails on test and does not read ~/.dircolors
Product: [Retired] Red Hat Linux Reporter: dado feigenblatt <redhat>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-01 03:24:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Don't quote ~ in colorls.csh none

Description dado feigenblatt 2003-08-14 21:38:52 UTC
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):


How reproducible:

Steps to Reproduce:
1. copy /etc/DIR_COLORS to ~/.dircolors
2. modify it
3. start a new terminal.
4. run ls
    
Actual results:
standard coloring of filenames

Expected results:
filenames colored according to the user's ~/.dircolors

Additional info:

Comment 1 Miloslav Trmač 2004-08-19 18:25:05 UTC
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-
| ter(s)

The attached patchs should be applied in coreutils.

Comment 2 Tim Waugh 2004-08-20 11:57:44 UTC
Please try coreutils-5.2.1-23.

Comment 3 Miloslav Trmač 2006-03-01 03:24:58 UTC
Fix confirmed in coreutils-5.93-7.2.