Michael B Allen([EMAIL PROTECTED]) is reported to have said: > Thomas Adam said: > > --- Michael B Allen <[EMAIL PROTECTED]> wrote: > >> Would anyone happen to know why? > > > > eval `dircolors -b` > > > > has always been what has worked for me: > > > > [EMAIL PROTECTED] n6tadam]$ unset LS_COLORS > > [EMAIL PROTECTED] n6tadam]$ eval $(dircolors -b) > > [EMAIL PROTECTED] n6tadam]$ echo $LS_COLORS > > That's basically what I was doing: > > eval `dircolors --sh /etc/DIR_COLORS` > > where /etc/DIR_COLORS was stolen from Red Hat. The --sh option is an alias > for -b. If I run the above on the commandline it works as advertised. But > when executed in /etc/profile it does not work. It exports LS_COLORS= but > the value is empty. I can see this by adding "env > /tmp/out" immediately > after the eval command and looking at /tmp/out. Maybe some environment > variable needs to be set like TERM=xterm. > > > > > [..output snipped..] > > > > You can uncomment the use of "eval `dircolors -b`" in ~/.bashrc > > I did. Also, noteworthy that if I change that line to "eval `dircolors -b > /etc/DIR_COLORS` it works. Of course it only works for me so it's still > not satisfactory. >
I have had this around for years and it still works. Grom an old /etc/dir_colors file #you can copy this file to .dir_colors in your $HOME directory to override # the system defaults. so i did that and them modified it to suit my tastes. Then added this to my .bash_profile # set up the color-ls environment variables: if [ "$SHELL" = "/bin/zsh" ]; then eval `dircolors -z ~/.dircolors` elif [ "$SHELL" = "/bin/ash" ]; then eval `dircolors -s ~/.dircolors` else eval `dircolors -b ~/.dircolors` fi HTH -- The day-to-day travails of the IBM programmer are so amusing to most of us who are fortunate enough never to have been one -- like watching Charlie Chaplin trying to cook a shoe. _______________________________________________________ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]