Code:Zshcompl

My .zshcompl file. Autocompletion settings for zsh. See also Shell configuration files. This file is sourced from my .zshrc file.

zstyle -e ':completion:*:ssh:*' hosts 'reply=($(sed -e "s/ .*\$//" -e "s/,.*//g" ~/.ssh/known_hosts ))' zstyle ':completion:*' completer _expand _complete _approximate zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*' max-errors 1 zstyle ':completion:*' prompt 'Found %e errors:' zstyle :compinstall filename $HOME/.zshcompl zstyle ':completion:*:expand:*' tag-order all-expansions zstyle ':completion:*' verbose yes zstyle ':completion:*:descriptions' format '%B%d%b' zstyle ':completion:*:messages' format '%d' zstyle ':completion:*:warnings' format 'No matches for: %d' zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b' zstyle ':completion:*' group-name '' ZLS_COLORS=$LS_COLORS zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} autoload -U compinit compinit -i
 * 1) Completion Styles
 * 1) By default, zsh completes file names. compinit and complist extend this
 * 2) to also autocomplete functions, hostnames, etc.
 * 3) Note that compctl is an old autocompletion module, which is not used here.
 * 1) Most of these lines are defaults as added by compinstall
 * 1) Autocompletion of hosts, based on ssh known_hosts and config files
 * 2) [ -f ~/.ssh/config ] && : ${(A)ssh_config_hosts:=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}}
 * 3) zstyle ':completion:*:*:*' hosts $ssh_config_hosts
 * 4) zstyle -e ':completion:*:ssh:*' hosts 'reply=($(grep "^host " ~/.ssh/config | sed -e "s/host //";sed -e "s/ .*\$//" -e "s/,.*//g" ~/.ssh/known_hosts ))'
 * 1) list of completers to use
 * 1) zstyle ':completion:*::::' completer _expand _complete _ignored _approximate
 * 1) zstyle ':completion:*' format 'Completing %d'
 * 1) allow one error for every three characters typed in approximate completer
 * 2) zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'
 * 1) insert all expansions for expand completer
 * 1) formatting and messages
 * 1) match uppercase from lowercase
 * 2) zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
 * 1) offer indexes before parameters in subscripts
 * 2) zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
 * 1) command for process lists, the local web server details and host completion
 * 2) zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args'
 * 3) zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html'
 * 4) zstyle '*' hosts $hosts
 * 1) Filename suffixes to ignore during completion (except after rm command)
 * 2) zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' '*?.old' '*?.pro'
 * 1) ignore completion functions (until the _ignored completer)
 * 2) zstyle ':completion:*:functions' ignored-patterns '_*'
 * 1) Load and init completion module
 * 1) Load and init completion listing module
 * 2) autoload -U complist
 * 3) complist