From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17160 invoked from network); 17 Sep 1999 11:10:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Sep 1999 11:10:17 -0000 Received: (qmail 18767 invoked by alias); 17 Sep 1999 11:10:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7910 Received: (qmail 18759 invoked from network); 17 Sep 1999 11:10:02 -0000 Date: Fri, 17 Sep 1999 12:10:01 +0100 From: Adam Spiers To: zsh workers mailing list Subject: Re: PATCH: add user control of hosts to complete Message-ID: <19990917121001.A27658@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh workers mailing list References: <19990917034627.B23925@thelonious.new.ox.ac.uk> <9909170751.AA13759@ibmth.df.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <9909170751.AA13759@ibmth.df.unipi.it> X-URL: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.9 i686 Peter Stephenson (pws@ibmth.df.unipi.it) wrote: > Adam Spiers wrote: > > : ${(A)hosts:=${(s: :)${(ps:\t:)${${(f)"$( > [:blank:]]#}}} > > > > +# Let the user add her own hosts in if she wants > > +hosts=( $hostnames $hosts ) > > As Sven already pointed out, $hosts is there for the user to set. It sets > its own defaults as a last gasp if it's empty. If you do have your own > hosts, the contents of /etc/hosts may be simply noise. I don't think we > need a separate variable. Ack, sorry about that. My brain tends to switch off when I look at horrendously obfuscated rats-dropping-core lines. OTOH, I do quite like the idea of having the choice of merging /etc/hosts in with the user-defined ones, but then I guess the user can just redefine _hosts for that.