I wanted to make custom colors for the ls command with zsh, but I find that all the previous answers to this do not work for me.

I tried all these options:

Option 1)

#export LS_COLORS
#zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}

Option 2)

#export LS_COLORS
#zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}

Option 3)

#zstyle ':completiom:*' list-colors 'di=1:fi=96:*.m=31:*.py=32:*.txt=36:*.out=35'

Option 4)

#zstyle ':completion:*' list-colors 'di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'

but all result of the ls command are displayed as if no color option was turned on.

The only thing that seems to work to change the colors at all is this:

export CLICOLOR=1

which I found from another answer somewhere that I can't find. However, what I want is to use my own custom colors indicated by:



  • For completness I also saw someone suggest to use gls but I had issues brew installing it so I gave up on that. Sorry can't find the link to that anymore.

Cross posted:


1 Answer 1


You might be missing zsh/complist module. Try zmodload zsh/complist.

Besides, if you want to have the ls colored output – which isn't something directly related to Zsh – then you should do: eval $(dircolors -b …path to the custom dircolors definitions…). Or use Zplugin and do:

zplugin wait"0c" lucid \
 atload'zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}";' for \

Not the answer you're looking for? Browse other questions tagged or ask your own question.