* bug: _ssh_hosts ignores ~/.ssh/config in favor of ~/.ssh/known_hosts
@ 2013-03-18 15:08 Christian Höltje
0 siblings, 0 replies; only message in thread
From: Christian Höltje @ 2013-03-18 15:08 UTC (permalink / raw)
To: zsh-workers
Hello, all!
It appears that in zsh 5.0.2 that the _ssh completion rule it is ignoring ~/.ssh/config in favor of hosts in ~/.ssh/known_hosts.
How to recreate the problem:
1. With a clean ~/.ssh/ directory.
2. Create an entry in ~/.ssh/config like so:
Host foobar
HostName foobar.example.com
3. Now try: ssh f<tab>
4. Note it completes as "ssh foobar"
5. Connect to host.
6. Say 'yes' to ssh prompt to add the host-key to known_hosts
7. Restart your zsh: exec zsh -l
8. Type: ssh f<tab>
9. Notice it completes to: "ssh foobar.example.com" and additional <tab>s won't show the entry from ~/.ssh/config at all.
I expected step 9 to be "ssh foobar" instead.
Some other bugs in _ssh_hosts:
It includes (multiple) '#' as completion targets. Presumably from ~/.ssh/config?
It doesn't understand known_hosts entries that look like: [foobar.example.com]:1234
Workaround: Set 'HashKnownHosts yes' in your ~/.ssh/config -- then nothing will match from ~/.ssh/known_hosts.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-18 15:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-18 15:08 bug: _ssh_hosts ignores ~/.ssh/config in favor of ~/.ssh/known_hosts Christian Höltje
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).