2

When I use Tab to complete a filename and more than one file matches, zsh uses an unsuitable color. Consider the following screenshot which exemplifies the problem:

zsh tab completion

I have entered vi .zsh and pressed Tab.

How can I change this color?

These are the relevant parts of the .zshrc file:

setopt EXTENDED_GLOB
setopt NO_CORRECT
setopt COMPLETE_IN_WORD

autoload -U colors && colors

## Completions
autoload -U compinit
compinit -C

## case-insensitive (all), partial-word and then substring completion
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'

setopt prompt_subst
PROMPT='%{$fg[blue]%}%1.${vcs_info_msg_0_}%{$reset_color%} $ '
  • 1
    That's not from the default setup. So you'll need to say how you configured zsh. – Gilles Apr 29 '11 at 23:42
  • 1
    @peth I want to change the color of the line reading vi .zsh. It starts out dark gray (like the completions below), upon pressing Tab, it changes the color to the light one shown in the screenshot. – Nickolay Kolev May 15 '11 at 10:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.