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

Re: autocompletion with remote hosts



On Mon, Dec 21, 2009 at 06:36:02PM +0100, Mr.SpOOn wrote:
> Hi,
> in bash I somehow managed to have autocompletion for remote hosts and
> directory when I used ssh and scp.
> 
> I can't find a way to have the same in zsh.
> Can you help me?


The way I do this is:

> zstyle ':completion:*' hosts host1 host2 host3 ...
in .zshrc

Theoretically, the completion for ssh/scp/etc. is also able to read the
hosts for completion directly from ~/.ssh/config or ~/.ssh/known_hosts,
however due to some fuckup (which so far noone could explain to me) it
never does this.



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