Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

known hosts tab completion



(4.3.15, FreeBSD port. I already tried manpages and IRC.)

In ~/.ssh/config I have three hosts: foo.tld foo-1.tld foo-2.tld

At a new prompt, under 'zsh -f; autoload compinit; compinit', 
I type:   ssh foo<tab>

I get:    ssh foo<cursor>.tld

What I want to do: complete to 'foo.tld' and move to the end of the
input line, in order enter a command (e.g., 'ssh foo.tld <cursor>'
in order to run 'ssh foo.tld date')

I don't see how to do that.

I see two workarounds: (a) press <tab> three times, to cycle through the
completions once; (b) 'setopt MENU_COMPLETE' (but that loses me
the ability to complete an unambiguous prefix (namely, 'cd ~/d<tab>' ->
'cd ~/do<cursor>' when ~/docs and ~/dots exist), which is a deal breaker
for me).

As to possible solutions, I'd be happy with something that doesn't fill
the ".tld" part to the right of the cursor, as then I could just type
'.<tab>' to get what I want (with the trailing space, even).

Pointers, please?



Messages sorted by: Reverse Date, Date, Thread, Author