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

Re: ssh completion



Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx> writes:

> On Sat, Aug 26, 2000 at 09:59:16PM +0200,
> Claus Alboege <tractrix@xxxxxxxxxx> wrote:
> > 
> > Could anyone tell, how I get zsh to read hostnames from
> > ~/.ssh/known_hosts instead of /etc/hosts using zstyle?
> 
> zstyle '*ssh*' hosts $(sed -e 's/ .*//' ~/.ssh/known_hosts)
> 
> Not perfect, but you should get the idea...

Here is a bit better one:

zstyle '*ssh*' hosts $(sed -e '/^#/d
s/ .*$//
s/,/ /g' /etc/ssh_known_hosts ~/.ssh/known_hosts)

HTH,
-- 
Ervin
						"Intelligenti pauca."



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