I customized the directory and file colors for ls
and cd
+ TAB
. Here is my configuration.
My configuration
My system environment.
Ubuntu 10.10
zsh 4.3.10 (x86_64-unknown-linux-gnu)
oh-my-zsh // http://git://github.com/robbyrussell/oh-my-zsh.git
Terminal
My .zshrc in $HOME.
// .zshrc
echo "Sourcing $0."
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="josh"
source $ZSH/oh-my-zsh.sh
A custom zsh script in ~/.oh-my-zsh/custom/completion.zsh
// completion.zsh
echo "Sourcing $0."
# Same completion colors when using cd as with ls.
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*:*:*:*:*' menu yes select
A custom zsh script in ~/.oh-my-zsh/custom/theme-and-appearance.zsh
// theme-and-appearance.zsh
echo "Sourcing $0."
export LS_COLORS='di=1;34:ln=35:so=32:pi=0;33:ex=32:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=1;34:ow=1;34:'
The problem description.
When I open the Terminal for the first time 3 files are sourced. Notice, that .zshrc
does appear but not with its path nor file name.
Sourcing zsh.
Sourcing /home/john/.oh-my-zsh/custom/completion.zsh.
Sourcing /home/john/.oh-my-zsh/custom/theme-and-appearance.zsh.
Using the ls
command the directory listing looks as expected. Though, when I use the cd
command and TAB
for autocompletion directory colors are not the same as with ls
.
Then I source the configuration once again. Notice, this time .zshrc
does appear with its full path and file name. I am not sure whether this contributes to the problem explained here.
$ . ~/.zshrc
Sourcing /home/john/.zshrc.
Sourcing /home/john/.oh-my-zsh/custom/completion.zsh.
Sourcing /home/john/.oh-my-zsh/custom/theme-and-appearance.zsh.
Now both ls
and cd
+ TAB
use the same colors.
Question
How do I have to change my configuration that the customization is loaded as soon as I open the Terminal application?