helm/zsh/completion
2013-08-17 04:33:12 -04:00

9 lines
313 B
Bash

autoload -Uz compinit && compinit
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
if [ -e "$HOME/.ssh/config" ]; then
zstyle -e ':completion::*:*:*:hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'
fi
# vim:set ft=zsh: