Bug 67263 - /etc/profile.d/colorls.sh only applies to the bash shell
Summary: /etc/profile.d/colorls.sh only applies to the bash shell
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 7.3
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: wdovlrrw
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-21 17:25 UTC by Nathan G. Grennan
Modified: 2007-04-18 16:43 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-07-01 12:39:41 UTC
Embargoed:


Attachments (Terms of Use)

Description Nathan G. Grennan 2002-06-21 17:25:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/0

Description of problem:
/etc/profile.d/colorls.sh only applies to the bash shell because of the line
below. Other shells that use /etc/profile, like zsh, can use the aliases defined
in colorls.sh just fine, but are excluded by the if statement.


if echo $SHELL |grep bash 2>&1 >/dev/null; then # aliases are bash only

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Install fileutils and zsh
2. chsh -s zsh user
3. login as user
4. ls
	

Actual Results:  No color on directories and files.

Expected Results:  Color on directories and files.

Additional info:

Comment 1 Bernhard Rosenkraenzer 2002-07-01 12:39:37 UTC
Agreed, fixed in 4.1.9-1. 
 
I'm now simply using 
 
alias foo=bar 2>/dev/null 
 
So it gets executed on any shell, but the ones not supporting it don't spew 
error messages. (Much better than hardcoding shell names)


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