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

Re: PATCH: add user control of hosts to complete



Peter Stephenson (pws@xxxxxxxxxxxxxxxxx) wrote:
> Adam Spiers wrote:
> >  : ${(A)hosts:=${(s: :)${(ps:\t:)${${(f)"$(</etc/hosts)"}%%\#*}##[:blank:]#[^
> > [: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.



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