From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17784 invoked from network); 8 Jun 2001 05:13:37 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Jun 2001 05:13:37 -0000 Received: (qmail 13315 invoked by alias); 8 Jun 2001 05:13:10 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3920 Received: (qmail 13297 invoked from network); 8 Jun 2001 05:13:09 -0000 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to lantern@shell10.ba.best.com using -f From: "Bart Schaefer" Message-Id: <1010608051312.ZM1251@candle.brasslantern.com> Date: Fri, 8 Jun 2001 05:13:12 +0000 In-Reply-To: <20010607144618.A18221@dman.com> Comments: In reply to Clint Adams "Re: 2 newbie ?s" (Jun 7, 2:46pm) References: <02fa01c0eedc$c41b1960$5219a8c0@dthiel> <20010607012609.A13243@idiocy.org> <20010606173424.A675@suse.com> <1010607163345.ZM7911@candle.brasslantern.com> <20010607144618.A18221@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Clint Adams Subject: Re: 2 newbie ?s Cc: zsh-users@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 7, 2:46pm, Clint Adams wrote: } } > That might actually be a bit *too* thorough ... } } I agree with the sentiment, though you're discarding all the hostname } information from /etc/hosts. Ah, true. zstyle -e ':completion:*:ssh:*' hosts 'reply=( ${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \ /dev/null)"}%%[# ]*}//,/ } ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*} )' I hate having to throw that /dev/null in there to keep `cat' from reading stdin; one of those cases where I wish there were a glob-flag for turning on csh_null_glob. It's also annoying that $(<...) doesn't do filename expansion or generation, which is why it has to use `cat' to begin with. -- 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