[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Color-ls Command?



>With the integration of color-ls directly into the fileutils
>package, a few things have changed.  dircolors no longer sets
>up aliases or shell scripts to colorize ls, dir, and vdir.
>
>Here is an excerpt from a .bashrc which sets up aliases after
>running dircolors:
>
>	# set up color-ls
>	eval `dircolors /home/syrus/.dir_colors`
>	alias d='ls -F --color=auto'
>	alias v='ls -l --color=auto'
>	alias vdir='ls -l --color=auto'
>	alias dir='ls -F --color=auto'                                                 
>
>Note that color=tty has been changed to color=auto.  See the
>documentation for other change information.
>
>
>Cheers.  Syrus.

Hi Syrus,

In fact the above didn't work for me either--dumped core the first time I
used 'ls' after that! Had a hell of a time trying to figure it out.In fact
the new way of doing things (at least in my case, and by new I mean Debian
1.1) isn't to rely on /etc/DIR_COLORS, as color-ls and dircolors don't seem
to read it! What I had to do was run dircolors, monitor its output, then
copy this into my profile (/home/cw/.bash_profile). This is what finally
did the trick:

*** Excerpt from .bash_profile ***

# set up color-ls
LS_COLORS='di=1;34:bd=40;33;1:ln=1;36:cd=40;33;1:ex=1;32:*.tar=1;31:*.tgz=1;31:*.gz=1;31:'
export LS_COLORS;
LS_OPTIONS='--8bit --color=tty -F';
export LS_OPTIONS;
alias ls='/usr/bin/color-ls $LS_OPTIONS ';
alias dir='/usr/bin/color-ls $LS_OPTIONS --format=vertical';
alias vdir='/usr/bin/color-ls $LS_OPTIONS --format=long';
alias d=dir;
alias v=vdir;

Of course, for all I know this could the *old* way of doing things, but it
works! Now I'm happy. Many thanks to all who responded.

Cheers,

Chris





Reply to: