diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-02-03 22:44:49 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-02-03 22:44:49 +0000 |
commit | dfea4c5eaa685ba8c7bff59dff5243ed5f428bf1 (patch) | |
tree | ca3e2c756c1fc7dd444f3725f5ad30573406d155 /Completion/Unix/Type/_hosts | |
parent | ed6c05aa7cccd69d4928907450f5d6d84d3ef287 (diff) | |
download | zsh-dfea4c5eaa685ba8c7bff59dff5243ed5f428bf1.tar.gz zsh-dfea4c5eaa685ba8c7bff59dff5243ed5f428bf1.tar.xz zsh-dfea4c5eaa685ba8c7bff59dff5243ed5f428bf1.zip |
22191: from Danek Duvall: neaten host and user completions
Diffstat (limited to 'Completion/Unix/Type/_hosts')
-rw-r--r-- | Completion/Unix/Type/_hosts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Unix/Type/_hosts b/Completion/Unix/Type/_hosts index e6833132f..7d88a4532 100644 --- a/Completion/Unix/Type/_hosts +++ b/Completion/Unix/Type/_hosts @@ -23,7 +23,7 @@ if ! zstyle -a ":completion:${curcontext}:hosts" hosts _hosts; then fi if [[ -r ~/.ssh/known_hosts ]]; then - _cache_hosts+=( $(sed -e '/^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]/d' -e 's/[ ,].*//p' ~/.ssh/known_hosts) ) + _cache_hosts+=(${${${(u)${(f)"$(<~/.ssh/known_hosts)"}%%[ ,]*}:#(#s)[0-9]##.[0-9]##.[0-9]##.[0-9]##(#e)}:#(#s)[0-9a-f:]##(#e)}) fi fi |