1

When I ls in a directory, the colors are printed as in the top example. These colors are controlled with EditPreferencesColorsPalette, which I have set to Solarized.

However, I have no idea why my autocompletion colors are completely different, as seen in the bottom example. Where do I set those? I use zsh, but had the same issue in bash, too.

enter image description here

1

According to this, add the following in your .zshrc file:

zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
autoload -Uz compinit
compinit

About the ls colors, I'm quoting this answer from Unix & Linux:

ls takes its color settings from the environment variable LS_COLORS. dircolors is merely a convenient way to generate this environment variable. To have this environment variable take effect system-wide, put it in your shell's startup file.

You can read more about dircolors here.

1
  • This is it. The default colors are the default dircolors settings when no custom config file is provided. This seems (at least on my machine) incidentally to be the same color set that ls uses when I manually unset LS_COLORS, which got me confused. – Felix Dombek Sep 17 '19 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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