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%} $ '
3
  • 1
    That's not from the default setup. So you'll need to say how you configured zsh. Apr 29, 2011 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. May 15, 2011 at 10:01
  • @NickolayKolev I cannot reproduce this with the config you posted. Are you sure you aren't also using something like zsh-syntax-highlighting? Aug 13, 2020 at 7:50

0

You must log in to answer this question.

Browse other questions tagged .