X-Git-Url: https://git.alrj.org/?p=zsh.d.git;a=blobdiff_plain;f=S40_completion;h=4c2d9af2e678ab86d7ac7aa5db1669d06e09c8c1;hp=222bc7f666add876ebee01f6eef8a8d6a007dda8;hb=fa67692f7af21ac494889ecc956b48c5c4cdf687;hpb=24e698a0e46b50c12b190da467bf5d7fa982e823 diff --git a/S40_completion b/S40_completion index 222bc7f..4c2d9af 100644 --- a/S40_completion +++ b/S40_completion @@ -1,5 +1,7 @@ #! /usr/bin/zsh +autoload -U compinit + hosts=($( ( \ ( [ -r ~/.ssh/config ] && awk '/^host +[a-z]/ { print $2 }' ~/.ssh/config) ; \ ( [ -r ~/.ssh/known_hosts ] && awk '{print $1}' ~/.ssh/known_hosts | tr , '\n') \ @@ -12,3 +14,6 @@ zstyle ':completion:*:hosts' list-colors '=(#b)(*)(.lln.iba)=01;30=01;31' '=[^.] users=(atihon ccadmin tcsadmin tcs clinical root) zstyle ':completion:*' users $users +compdef _hosts cc_sync + +compinit