On Feb 8, 7:55 am, Stephane Chazelas <
stephane_chaze...@yahoo.fr>
wrote:
> 2012-02-07 18:12:31 -0800,
p...@gmail.com:
> [...]
>
> > > dircolors -p > ~/.dircolors
> > > vi ~/.dircolors
>
> > > And add
>
> > > eval "$(dircolors -b ~/.dircolors)"
> > > zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
>
> > > to your ~/.zshrc
> [...]
> > Thanks for the tip! Unfortunately, my dircolors does not work:
>
> > % eval $(dircolors -b ~/temp)
>
> > % echo $LS_COLORS
>
> That doesn't match what I wrote. You forgot some quotes.
>
> Also, what's in your ~/temp? Is it really based on the output of
> dircolors -p? What does dircolors -b output?
Sorry, I had made ~/temp to simplify the color specifications so that
it is easier to debug. Here is what happens with the commands you
wrote:
% dircolors -p > ~/.dircolors
% less ~/.dircolors
% eval "$(dircolors -b ~/.dircolors)"
% echo $LS_COLORS
% zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
% ls a<tab>
abc/ abd/
Not surprisingly, the directories are not colored because LS_COLORS is
empty.
It works as expected in Bash-terminal but not in Xterm. So I thought
maybe it has to do with my X resources, but that does not seem to
affect it either:
% xrdb -remove
% xrdb -query
% eval "$(dircolors -b ~/.dircolors)"
% echo $LS_COLORS
% # Still empty.
> > % echo $ZLS_COLORS
>
> The solution I gave doesn't set $ZLS_COLORS, but uses the zstyle
> way instead. You should probably avoid setting it as it may
> cause conflicts.
I see.
> --
> Stephane
Thanks for your help!
Philip