From a5efacfc5a6a602ea5a0f67df2883da713e9fc2a Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 5 Feb 2009 14:51:05 +0100 Subject: [Completion] updated config with compinstall --- 60_Completion.zsh | 70 ++++++++++++++----------------------------------------- 1 file changed, 18 insertions(+), 52 deletions(-) (limited to '60_Completion.zsh') diff --git a/60_Completion.zsh b/60_Completion.zsh index 67a9165..a3561a2 100644 --- a/60_Completion.zsh +++ b/60_Completion.zsh @@ -7,60 +7,26 @@ ## You are encouraged to use, modify, and redistribute ## these files with or without this notice. ## -# Fichier de conf pour la personnalisation de la complÃtion automagique :-) -# Hugues HIEGEL -# jeu mar 3 10:00:44 CET 2005 -autoload -U compinit 2> /dev/null -compinit -i - -## Affiche le menu de sélection si au moins 2 entrées sont possibles -zstyle ':completion:*' menu select=2 -## Utilise les couleurs définies avec dircolors -zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} - -## Sépare les résultats en groupes +# Show groups for completion results zstyle ':completion:*' group-name '' zstyle ':completion:*' format '%B---------------[ %d ]%b' +# Uses dircolors for colors +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} -# Premiers essais... -#_ssh_hosts=(${(o)${${(M)${(f)"$(<~/.ssh/config)"}##host*}/host /}%% *}) -#zstyle ':completion:*:*:ssh,scp:*' hosts $_ssh_hosts -#zstyle ':completion:*:(ssh|scp):*:my-accounts' hosts ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} - - -# http://www.michael-prokop.at/computer/config/.zsh/zsh_completition - -#zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' -#zstyle ':completion:*:killall:*' command 'ps -u $USER -o cmd' -#zstyle ':completion:*:kill:*' insert-ids single -#zstyle ':completion:*:*:kill:*' menu yes select -#zstyle ':completion:*:kill:*' force-list always -#zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' +zstyle ':completion:*' completer _complete _expand +zstyle ':completion:*' ignore-parents parent pwd directory -# ssh/scp-completion -#zstyle ':completion:*:scp:*' tag-order \ -# 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *' -#zstyle ':completion:*:scp:*' group-order \ -# users files all-files hosts-domain hosts-host hosts-ipaddr -#zstyle ':completion:*:ssh:*' tag-order \ -# users 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *' -#zstyle ':completion:*:ssh:*' group-order \ -# hosts-domain hosts-host users hosts-ipaddr -#zstyle ':completion:*:(ssh|scp):*:hosts-host' ignored-patterns \ -# '*.*' loopback localhost -#zstyle ':completion:*:(ssh|scp):*:hosts-domain' ignored-patterns \ -# '<->.<->.<->.<->' '^*.*' '*@*' -#zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns \ -# '^<->.<->.<->.<->' '127.0.0.<->' -#zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns \ -# adm bin daemon halt lp named shutdown sync -#zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=( -# ${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \ -# /dev/null)"}%%[# ]*}//,/ } -# ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*} -# ${${${(M)${(s:# :)${(zj:# :)${(Lf)"$([[ -f ~/.ssh/config ]] && <~/.ssh/config)"}%%\#*}}##host(|name) *}#host(|name) }/\*} -# )' -## ${(A)ssh_config_hosts:=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}} -# -#zstyle -e ':completion:*:quilt:*' command 'quilt help|tail -n +4|head -6' +# Displays selection menu only when there is 2 items or more +zstyle ':completion:*' menu select=2 +#zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s +#zstyle ':completion:*' matcher-list '+l:|=* r:|=*' '+' '+m:{a-z}={A-Z} m:{a-zA-Z}={A-Za-z}' 'r:|[._-/]=** r:|=**' +zstyle ':completion:*' preserve-prefix '//[^/]##/' +zstyle ':completion:*' prompt '%e errors found >' +zstyle ':completion:*' select-prompt '%B[ %p ]%b' +zstyle ':completion:*' squeeze-slashes true +zstyle ':completion:*' use-compctl true +# End of lines added by compinstall + +autoload -Uz compinit +compinit -i -- cgit v1.2.3