Tooltime: zsh #7
zsh - completion quickstart
Das die zsh eh die geilste Shell ist, ist ja sowieso klar.
Da einem immer wieder Anfänger über den weg laufen, die die geile Kompletierung
nicht eingeschaltet haben, gibt's hier mal eben ein kleines Schnipsel zsh Code,
der als Quickstart dienen soll. (weitere Informationen in 'man zshcompsys'):
zmodload zsh/complist
autoload -U compinit && compinit
zstyle ':completion:::::' completer _complete _approximate
zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )'
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:*' menu select
zstyle ':completion:*' verbose yes
Danach einfach mal 'ls -<TAB><TAB>' eingeben und glücklich sein. :)
(Ja, man kann die Cursortasten zur Auswahl benutzen...)
Das ist natürlich nur ein Anfang, das System kann viel viel mehr.
(Comments: 0)