mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
27762: omit ssh known_hosts entries with port numbers from host completion.
This commit is contained in:
parent
21193d7f01
commit
b64f7a8bcc
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-02-28 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 27762: Completion/Unix/Type/_hosts: omit ssh known_hosts
|
||||
entries with port numbers from host completion.
|
||||
|
||||
2010-02-27 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* users/14905 (modified, see users/14096): Doc/Zsh/expn.yo,
|
||||
|
@ -12849,5 +12854,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.4921 $
|
||||
* $Revision: 1.4922 $
|
||||
*****************************************************
|
||||
|
|
|
@ -41,9 +41,9 @@ if ! zstyle -a ":completion:${curcontext}:hosts" hosts _hosts; then
|
|||
|
||||
for khostfile in $khostfiles; do
|
||||
if [[ -r $khostfile ]]; then
|
||||
khosts=(${(s:,:)${(j:,:)${(u)${(f)"$(<$khostfile)"}%%[ |#]*}}})
|
||||
khosts=(${${(s:,:)${(j:,:)${(u)${(f)"$(<$khostfile)"}%%[ |#]*}}}:#*[\[\]]*})
|
||||
if [[ -z $useip ]]; then
|
||||
khosts=(${${khosts:#(#s)[0-9]##.[0-9]##.[0-9]##.[0-9]##(#e)}:#(#s)[0-9a-f:]##(#e)})
|
||||
khosts=(${${${khosts:#(#s)[0-9]##.[0-9]##.[0-9]##.[0-9]##(#e)}:#(#s)[0-9a-f:]##(#e)}:#*[\[\]]*})
|
||||
fi
|
||||
_cache_hosts+=($khosts)
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue