There are quite a lot of zsh users that do use the new compsys (via compinit), but do not know how much it can do. Many features are not enabled by default. There's a compinstall function, but to enable the basic features, paste this to your .zshrc:

zmodload zsh/complist
autoload -U compinit && compinit

zstyle ':completion:::::' completer _complete _approximate

zstyle ':completion:*:descriptions' format "- %d -"
zstyle ':completion:*:corrections' format "- %d - (errors %e})"
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
zstyle ':completion:*' group-name ''
zstyle ':completion:*:manuals' separate-sections true
zstyle ':completion:*:manuals.(^1*)' insert-sections true
zstyle ':completion:*' menu select
zstyle ':completion:*' verbose yes

zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )'
zstyle ':completion::approximate*:*' prefix-needed false

After that, try: ls -<TAB><TAB>
…use your cursor keys.

examples/compquickstart.txt · Last modified: 2015/12/08 07:46 by spamkiller