Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ssh host completion: ~/.ssh/config vs /etc/hosts
On Aug 10, 12:33pm, Moritz Bunkus wrote:
}
} I just noticed this interesting thing: if certain hosts are listed in
} /etc/hosts then the ssh completion will complete _but not list_ hosts in
} ~/.ssh/config that have the same prefix.
At the very top of _ssh_hosts is:
# If users-hosts matches, we shouldn't complete anything else.
The users-hosts completion looks at /etc/hosts and ~/.ssh/known_hosts,
so hosts from your ~/.ssh/config are only completed when no possible
matches are found in either of those other places.
(Or at least I think that's what's going on, because the very next
thing in _ssh_hosts is to examine ~/.ssh/config (or the config file
name following the -F option).)
The explanation is here:
http://www.zsh.org/mla/users/2007/msg00233.html
It seems a bit odd that this kicks in when there is no user-name part
in the word being completed.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author