Red Hat Bugzilla – Bug 67263
/etc/profile.d/colorls.sh only applies to the bash shell
Last modified: 2007-04-18 12:43:27 EDT
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):
Steps to Reproduce:
1. Install fileutils and zsh
2. chsh -s zsh user
3. login as user
Actual Results: No color on directories and files.
Expected Results: Color on directories and files.
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)