From: Motoi Washida <a66@h8.dion.ne.jp>
To: Wataru Kagawa <wkagawa@jota.gsc.riken.go.jp>
Cc: zsh-users@sunsite.dk
Subject: Re: outputs of _users and _hosts to arrays
Date: Wed, 27 Jul 2005 01:23:13 +0900 [thread overview]
Message-ID: <364B3C7A-F7EC-4126-A79B-10A9833B6E10@h8.dion.ne.jp> (raw)
In-Reply-To: <FCECEA34-165D-4F84-9316-365ECE23E3DB@jota.gsc.riken.go.jp>
On 07/26/2005, at 10:56, Wataru Kagawa wrote:
>>> hosts=( ${$( cat /etc/hosts | cut -d : -f 1,7 | grep -v
>>> "#" )//:*/} )
>>>
>>> to get what I need.
>>>
>> This has the same problem, but I don't know a better way well.
>> Using some functions from Perl or some other language?
>
> Do you mean that the commands inside the parameter expansion may
> work on Mac OS X but not on other computers?
On some systems using NIS, you can get host names of your network
from shared database, IIRC.
But I think you can get better results by setting hosts manually.
% zstyle ':completion:*' hosts ${${(f)"$(<~/.ssh/known_hosts)"}%%
[[:space:],]*}
see http://www.zsh.org/mla/users/2005/msg00084.html
prev parent reply other threads:[~2005-07-26 16:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-24 7:05 Wataru Kagawa
2005-07-24 9:33 ` Bart Schaefer
2005-07-25 5:18 ` Wataru Kagawa
2005-07-25 5:38 ` Wataru Kagawa
2005-07-25 9:15 ` Motoi Washida
2005-07-26 1:56 ` Wataru Kagawa
2005-07-26 16:23 ` Motoi Washida [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=364B3C7A-F7EC-4126-A79B-10A9833B6E10@h8.dion.ne.jp \
--to=a66@h8.dion.ne.jp \
--cc=wkagawa@jota.gsc.riken.go.jp \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).