Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 2 newbie ?s
- X-seq: zsh-users 3920
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Clint Adams <clint@xxxxxxx>
- Subject: Re: 2 newbie ?s
- Date: Fri, 8 Jun 2001 05:13:12 +0000
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20010607144618.A18221@xxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <02fa01c0eedc$c41b1960$5219a8c0@dthiel> <20010607012609.A13243@xxxxxxxxxx> <20010606173424.A675@xxxxxxxx> <1010607163345.ZM7911@xxxxxxxxxxxxxxxxxxxxxxx> <20010607144618.A18221@xxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author