Bug 102412 - /etc/profile.d/colorls.csh fails on test and does not read ~/.dircolors
Summary: /etc/profile.d/colorls.csh fails on test and does not read ~/.dircolors
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: coreutils
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-08-14 21:38 UTC by dado feigenblatt
Modified: 2007-04-18 16:56 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-03-01 03:24:58 UTC

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

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.

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