_ssux (405B)
1 #compdef ssux 2 3 _ssux() { 4 local -a hosts 5 IFS=$'\n' hosts=($(\ 6 awk '/^Host [A-Za-z]+/ {print $2}' \ 7 $HOME/.ssh/config \ 8 $HOME/.ssh/hosts.conf \ 9 $HOME/.ssh/local.conf \ 10 $HOME/.ssh/lxc.conf)) 11 local -a known 12 known=($(awk '/^[A-Za-z]+/ {print $1}' $HOME/.ssh/known_hosts | awk -F, '{print $1}' | sort | uniq)) 13 _describe -t hosts 'hosts' hosts 14 _describe -t known 'known' known 15 return 0 16 } 17 18 _ssux