Bug 38370 - ls should not use --color=tty unless .dircolors is present
Summary: ls should not use --color=tty unless .dircolors is present
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-30 07:13 UTC by Bob Proulx
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-04-30 07:13:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Bob Proulx 2001-04-30 07:13:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.18 i686)


Redhat imposes a default --color=tty option alias on ls commands by
default.  That is
undesireable.  You can't predict what foreground and background colors the
user is
going to be using and therefore many default color combinations will be
unreadable. 
Also, this behavior is imposed upon a user in the global /etc/profile.d
startup whether
the user would want this or not.  That is not desireable.

Redhat has configured it to be possible to disable colorization by adding a
.dircolors
file in the user's home directory and configuring this to be "COLOR none"
but 
that means that if you don't want this breakage you have to ask to get
better behavior?
That is also undesireable.  It would be best to have normal ls behavior by
default and
turn colorization on if and only if the user requests it, possibly by
having the .dircolors
file in their home directory, as before.  That would maintain compatibility
with all users
that have specified colors to be used but would prevent this breakage when
it is not
desired to have colorization.

At the very least the files in /etc/profile.d should be separated into an
additional
package such that it could be individually removed or avoided.  In the
general
case avoided.


Reproducible: Always
Steps to Reproduce:
1. log in
2. ls


Actual Results:  The /etc/profile.d/colorls.sh file was sourced and aliases
for ls defined which
included the --color=tty option.

Expected Results:  I expected ls to behave in the traditional manor WITHOUT
color.  This is
also the default GNU behavior.  Only Redhat has this imposed breakage.

Comment 1 Bernhard Rosenkraenzer 2001-04-30 13:06:20 UTC
It's not a bug, it's a feature, because most users find the colorized output 
more readable.
If you don't like it, echo "unalias ls" >>~/.bashrc



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