This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 102412 - /etc/profile.d/colorls.csh fails on test and does not read ~/.dircolors
/etc/profile.d/colorls.csh fails on test and does not read ~/.dircolors
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: coreutils (Show other bugs)
9
All Linux
medium Severity low
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-14 17:38 EDT by dado feigenblatt
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-28 22:24:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Don't quote ~ in colorls.csh (603 bytes, patch)
2004-08-19 14:25 EDT, Miloslav Trmač
no flags Details | Diff

  None (edit)
Description dado feigenblatt 2003-08-14 17:38:52 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):


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 14:25:05 EDT
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 07:57:44 EDT
Please try coreutils-5.2.1-23.
Comment 3 Miloslav Trmač 2006-02-28 22:24:58 EST
Fix confirmed in coreutils-5.93-7.2.

Note You need to log in before you can comment on or make changes to this bug.