diff options
author | hugues <hugues@a0e5b806-a6f9-0310-978d-cbce73f8a913> | 2007-05-16 10:17:44 +0000 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-07 14:15:11 +0100 |
commit | 72896f1d1d0ae633d360aede3956d42036fd600d (patch) | |
tree | a6a94a70c15918a416dae7e8504aea7fb95543ac /60_Completion.zsh | |
parent | e9962a5ffdc774468cfb3fd09a2dfe03190e5ad2 (diff) |
=?utf-8?q?Tout=20plein=20de=20modifs,=20du=20m=C3=A9nage,=20des=20trucs=20en=20plus,
=20plus=20beaux,=20moins=20moches,=20plus=20mieux=20et=20tout=20et=20tout=208-)?=
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.5.4.1"
This is a multi-part message in MIME format.
--------------1.5.4.1
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@382 a0e5b806-a6f9-0310-978d-cbce73f8a913
Diffstat (limited to '60_Completion.zsh')
-rw-r--r-- | 60_Completion.zsh | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/60_Completion.zsh b/60_Completion.zsh new file mode 100644 index 0000000..63bffa5 --- /dev/null +++ b/60_Completion.zsh @@ -0,0 +1,62 @@ +## +## Part of configuration files for Zsh 4 +## by Hugues Hiegel <hugues@hiegel.fr> +## +## NO WARRANTY PROVIDED, USE AT YOUR OWN RISKS +## +## 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 <hugues@nullpart.net> +# 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} + +# 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' + +# 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' |