Completion styles change how Zsh presents and matches command completions after the completion system is enabled. Use them when completion works, but the completion list needs menu selection or case-insensitive matching adjusted.
The zstyle command stores values against completion contexts. A broad context such as :completion:* applies across the completion system, while narrower contexts can target one completer, command, or tag later without replacing the general defaults.
A safe update backs up ~/.zshrc, writes the style lines near compinit, and starts a fresh interactive Zsh process to read back the stored styles. Syntax checking catches a broken startup file before the next terminal session depends on it.
Related: How to enable command completion in Zsh
Related: How to configure Zsh startup files
$ zsh --version zsh 5.9 (aarch64-unknown-linux-gnu)
$ if [ -f ~/.zshrc ]; then cp ~/.zshrc ~/.zshrc.bak; fi
No output means the command copied an existing file or skipped the backup because no ~/.zshrc file was present.
autoload -Uz compinit
compinit -d "${ZDOTDIR:-$HOME}/.zcompdump"
zstyle ":completion:*" menu select
zstyle ":completion:*" matcher-list "m:{a-zA-Z}={A-Za-z}"
The menu select style starts menu selection for completion lists. The matcher-list value makes letter-case differences less strict when matching completion candidates. If ~/.zshrc already has a compinit block, keep one copy and add the zstyle lines near it.
$ zsh -n ~/.zshrc
No output from zsh -n means Zsh parsed the startup file without finding a syntax error.
$ zsh -ic 'zstyle -L ":completion:*" menu' zstyle ':completion:*' menu select
$ zsh -ic 'zstyle -L ":completion:*" matcher-list'
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
$ zsh -ic 'printf "cd_completion=%s\n" "${_comps[cd]:-missing}"'
cd_completion=_cd
If the completion check returns missing, confirm that compinit runs before the style check and that it did not stop on insecure completion directories.