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

Re: 2 newbie ?s



On Jun 6,  5:34pm, Mads Martin Jørgensen wrote:
} Subject: Re: 2 newbie ?s
}
} 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))'
 
} "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.

In that spirit:

    zstyle -e ':completion:*:ssh:*' hosts 'reply=(
	${=${${(f)"$(cat {/etc/,{/etc/ssh_,~/.ssh/}known_}hosts(|2)(N) \
			 <<(ypcat hosts 2>/dev/null))"}%%[# ]*}//,/ }
	)'

That might actually be a bit *too* thorough ...

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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