Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 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
Product: Red Hat Linux
Classification: Retired
Component: coreutils (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
Depends On:
  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:
Last Closed: 2006-02-28 22:24:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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.