Re: Problem changing display color in 'ls'
On 2008-02-14 10:11:54 -0600, John Salmon wrote:
[...]
> Noting that this could be a problem, I followed the book and ran 'dircolors
> -p > colors'. I edited the 'colors' file to make '.bmp' files show as bold
> black on cyan and then ran 'dircolors colors'. 'echo $LS_COLORS' showed no
> change in the '.bmp' entry. 'ls -l' also showed no change.
Yes, dircolors doesn't change anything, and cannot change the parent
environment.
> Next, I ran 'dircolors > colors'. This put the actual commands in 'colors'.
> I made the changes to the '.bmp' entry, made the file executable and ran
> it. Still no change.
Same problem. If you run the file, it will only change its environment,
not the environment of your shell (which is the parent environment).
You need to *source* the file so that it is interpreted in the
environment of your shell.
> I then got into the 'colors' file and cut the first (long) line. I pasted
> this line into me command prompt and exrcuted it.
> I also ran 'export LS_COLORS'. This DID change 'LS_COLORS' to the value
> I wanted, but running 'ls -l' showed still bm on white.
I have no explanations for that. Does something like
LS_COLORS='*.bmp=01;35' ls file.bmp
(with the values you want) work?
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Reply to: