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

Re: 2 newbie ?s



* Alan Third <alan@xxxxxxxxxx> [Jun 06. 2001 17:26]:
> On Wed, Jun 06, 2001 at 04:02:31PM -0700, David Thiel wrote:
> > Yeah, I have something similar, but it won't complete the hostname if you
> > have something directly before it, like dthiel@xxxxxxxxxxxxxx  If you just
> > ping bla(tab), it'll work.  That's what I'm trying to figure out.
> 
> I use:
> 
> zstyle ':completion:*:hosts' hosts $hosts
> 
> Where $hosts holds the list of hostnames I want to use.
> That seems to work perfectly with ssh alan@os<tab> and suchlike.

Or how about this one:

zstyle -e ':completion:*:ssh:*' hosts 'reply=($(sed -e "/^#/d" -e "s/
.*\$//" -e "s/,/ /g" /etc/ssh_known_hosts ~/.ssh/known_hosts
~/.ssh/known_hosts2 2>/dev/null))'

-- 
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic and
totally illogic, with just a little bit more effort."
                                -- A. P. J.



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