#Init completion System zstyle :compinstall filename '$HOME/.zshrc' autoload -Uz compinit compinit # Crée un cache des complétion possibles # très utile pour les complétion qui demandent beaucoup de temps # comme la recherche d'un paquet aptitude install moz zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path ~/.zsh_cache # Competion Verbose 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:*' group-name '' # Add autocompletion for sudo when command is not in $PATH zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \ /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin # des couleurs pour la complétion # faites un kill -9 pour voir :) zmodload zsh/complist setopt extendedglob zstyle ':completion:*:*:kill:*:processes' list-colors "=(#b) #([0-9]#)*=36=31" #completion des hosts avec le contenue de know_hosts #local _myhosts #if [[ -f $HOME/.ssh/known_hosts ]]; then # _myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} ) # zstyle ':completion:*' hosts $_myhosts #fi #menu pour la completion zstyle ':completion:*' menu select=2 zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s