Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 86298 - automatically do color ls if CLICOLOR (or LS_COLORS) are set
Summary: automatically do color ls if CLICOLOR (or LS_COLORS) are set
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: coreutils
Version: 9
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-03-19 05:49 UTC by Michael Wardle
Modified: 2007-03-27 04:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-02 18:23:28 UTC


Attachments (Terms of Use)
automatically produce color output if $CLICOLOR is set (deleted)
2003-03-19 07:29 UTC, Michael Wardle
no flags Details | Diff

Description Michael Wardle 2003-03-19 05:49:02 UTC
/etc/profile.d/colorls.csh sets some aliases related to the command "ls".
One of these replaces any instance of "ls" with "ls --color=tty".  This
causes problems when some commands such as "rpm -qf `which ls`" are issued.

Comment 1 Michael Wardle 2003-03-19 07:28:34 UTC
I prefer the method employed by FreeBSD, which is to automatically color the
output if the environment variable CLICOLOR is set and the output is a TTY,
negating the need for any shell aliases, which can cause some problems (one of
which I mentioned above).

I have just sent a patch to bug-coreutils to add this functionality to GNU ls.

I will also attach it here in case you would like to adopt it for your package.


Comment 2 Michael Wardle 2003-03-19 07:29:57 UTC
Created attachment 90657 [details]
automatically produce color output if $CLICOLOR is set

Comment 3 Michael Wardle 2003-03-19 23:34:57 UTC
After reflecting on this, I realize that "which ls" can validly return an
alias rather than a path to an executable file, so this is not strictly a bug.

Still, I like the FreeBSD method, and I'd be happy if you could consider the
attached patch, which should save some amount of mess in login scripts
(/etc/profile.d/ and the like).

You might also note that the provided patch can very easily be modified to
default to color ls if LS_COLORS is set rather than CLICOLOR.


Comment 4 Tim Waugh 2003-04-01 13:41:57 UTC
I'll wait and see if it's adopted upstream I think.

Comment 5 Bill Nottingham 2006-08-04 21:32:48 UTC
Red Hat apologizes that these issues have not been resolved yet. We do want to
make sure that no important bugs slip through the cracks.

Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
They are maintained by the Fedora Legacy project (http://www.fedoralegacy.org/)
for security updates only. If this is a security issue, please reassign to the
'Fedora Legacy' product in bugzilla. Please note that Legacy security update
support for these products will stop on December 31st, 2006.

If this is not a security issue, please check if this issue is still present
in a current Fedora Core release. If so, please change the product and version
to match, and check the box indicating that the requested information has been
provided.

If you are currently still running Red Hat Linux 7.3 or 9, please note that
Fedora Legacy security update support for these products will stop on December
31st, 2006. You are strongly advised to upgrade to a current Fedora Core release
or Red Hat Enterprise Linux or comparable. Some information on which option may
be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Any bug still open against Red Hat Linux 7.3 or 9 at the end of 2006 will be
closed 'CANTFIX'. Again, if this bug still exists in a current release, or is a
security issue, please change the product as necessary. We thank you for your
help, and apologize again that we haven't handled these issues to this point.


Comment 7 Bill Nottingham 2007-01-02 18:23:28 UTC
Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
f you are currently still running Red Hat Linux 7.3 or 9, you are strongly
advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux
or comparable. Some information on which option may be right for you is
available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.


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