I customized the directory and file colors for ls and cd + TAB. Here is my configuration.My configuration My system environment.Ubuntu 10.10zsh 4.3.10 (x86_64-unknown-linux-gnu)oh-my-zsh // http://git://github.com/robbyrussell/oh-my-zsh.gitTerminalMy .zshrc in $HOME.// .zshrcecho Sourcing $0.ZSH=$HOME/.oh-my-zshZSH_THEME=joshsource $ZSH/oh-my-zsh.shA custom zsh script in ~/.oh-my-zsh/custom/completion.zsh// completion.zshecho Sourcing $0.# Same completion colors when using cd as with ls.zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}zstyle ':completion:*:*:*:*:*' menu yes selectA custom zsh script in ~/.oh-my-zsh/custom/theme-and-appearance.zsh// theme-and-appearance.zshecho 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.QuestionHow do I have to change my configuration that the customization is loaded as soon as I open the Terminal application?
Terminal does not source .zshrc with custom colors for ls and cd command
terminal;zsh;colors;autocomplete;oh my zsh
The problem is in the order the files are sourced. LS_COLORS must be defined before you run zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}. You can fix this by renaming the files to something like 00theme-and-appearance.zsh and 01completion.zsh.