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

problems with ssh tab completion



I'm having problems with Tab completion script for ssh.

When I execute a zstyle line:

zstyle ':completion:*' hosts

to only use hosts from ~/.ssh/config, omitting ones in /etc/hosts, and
type:

% ssh username@^I

I get:

% ssh username@.

with a literal dot after the '@' sign. The host list is displayed after
another Tab key press. However, typing characters won't help to
disambiguate the list, as the leading '.' is there. Why is it being
displayed?

Strangely enough, it only happens if the username portion is longer than
4 characters.

The second problem occurs after matching multiple similar hosts, such as
ones I connect to: "rollercoaster.insane.pl" and "rodney.ltd.pl".
Typing:

% ssh sthalik@ro^I

yields:

~% ssh sthalik@xxxxxx
remote host name
rodney.ltd.pl            rollercoaster.insane.pl

with the cursor placed between two dots.

I'd like it to just omit the '..pl' portion, as I find this kind of
completion confusing.

Oddly enough, it only happens if I specify the username portion and the
'@' sign.

I'm using zsh 4.3.2.

Any hints?
-- sh



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