On Sun, Mar 19, 2000 at 12:25:06PM -0800, Eric G . Miller wrote: > On Sun, Mar 19, 2000 at 09:09:23PM +0100, Andreas Sliwka wrote: > > Hi, how do I configure the colors ls shows? I cant find any kind of > > manual for this ... neither man ls nor info ls nor > > /usr/share/doc/fileutils ... > > >From man ls: > --color[=WHEN] > control whether color is used to distinguish file > types. WHEN may be `never', `always', or `auto' > > I have this in my $HOME/.bashrc: > > export LS_OPTIONS='--color=auto' > eval `dircolors` > alias ls='ls -F $LS_OPTIONS' #The -F appends a character for type. > alias ll='ls $LS_OPTIONS -l' > alias l='ls $LS_OPTIONS -lA'
I think Andreas meant how to change the mapping between extension and colour. This is all controlled by the environment variable LS_COLORS. I had to change this to show .mpeg in the same colour as .mpg Enter 'set | grep LS_COLORS' to see the current value. man dircolors tells you all you need to know. Basically, dump your existing colours to a file, e.g. to ~/.dircolors, using the -p option, then edit the file to suit your situation. Full instructions concerning the values and properties are written into the file. To use the file, use the following as part of your shell startup e.g. export LS_OPTIONS='--color=always' eval `dircolors ~/.dircolors` inside your ~/.bashrc or equiv. Hope that helps. -- Regards, Paul