1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-30 19:20:53 +02:00

Weed out hashed host lines that start with a '|' since they're

completely useless for completion.
This commit is contained in:
Wayne Davison 2006-02-16 22:44:00 +00:00
parent 88ca4d461d
commit 4c83a7dbbf

View file

@ -23,7 +23,7 @@ if ! zstyle -a ":completion:${curcontext}:hosts" hosts _hosts; then
fi
if [[ -r ~/.ssh/known_hosts ]]; then
_cache_hosts+=(${${${(u)${(f)"$(<~/.ssh/known_hosts)"}%%[ ,#]*}:#(#s)[0-9]##.[0-9]##.[0-9]##.[0-9]##(#e)}:#(#s)[0-9a-f:]##(#e)})
_cache_hosts+=(${${${(u)${(f)"$(<~/.ssh/known_hosts)"}%%[ ,|#]*}:#(#s)[0-9]##.[0-9]##.[0-9]##.[0-9]##(#e)}:#(#s)[0-9a-f:]##(#e)})
fi
fi