Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Or... just say "zsh"' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Or... just say "zsh"
Authored by: Titanium Man on Oct 14, '04 09:20:46PM

Yikes, that should look like this:

autoload -U compinit
compinit -C -d ~/.zcompdump_$ZSH_VERSION
typeset -aU hostnames
hostnames=(
host1.example.com
host2.example.com
host1.otherexample.com
)
[[ -f $HOME/.ssh/known_hosts ]] && hostnames+=(
${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*}
)
zstyle ':completion:*:*:ssh:*:hosts' hosts $hostnames
zstyle ':completion:*:*:ftp:*:hosts' hosts $hostnames
zstyle ':completion:*:hosts' hosts $hostnames



[ Reply to This | # ]