zsh-users
 help / color / mirror / code / Atom feed
From: Eric Gillespie <epg@pretzelnet.org>
To: Mario Lang <mlang@delysid.org>
Cc: zsh-users@sunsite.auc.dk
Subject: Re: {(t)...} usage
Date: Sat, 15 Jun 2002 16:29:18 -0500	[thread overview]
Message-ID: <20020615212919.29113A2C8@romulus.pretzelnet.org> (raw)
In-Reply-To: Message from Mario Lang <mlang@delysid.org>  of "Fri, 14 Jun 2002 17:06:37 +0200." <87it4l7vcy.fsf@lexx.delysid.org>

Mario Lang <mlang@delysid.org> writes:

> Can anyone give me an example on how to do this?

Here's how i do host completion based purely on ssh known_hosts
files.  This strips newlines and comments.

my_hosts=(${(M)${${${${(f)"$(<~/.ssh/known_hosts2)"}:#[0-9]*}%%\ *}%%,*}:#^\#})
etc_file=/etc/ssh/ssh_known_hosts2
if [[ -f $etc_file ]]; then
    etc_hosts=(${(M)${${${${(f)"$(<$etc_file)"}:#[0-9]*}%%\ *}%%,*}:#^\#})
fi
zstyle ':completion:*:*:(ping|nc|s(sh|cp)):*' hosts $etc_hosts $my_hosts

--  
Eric Gillespie <*> epg@pretzelnet.org

Conformity is a sin.


  reply	other threads:[~2002-06-15 21:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-14 15:06 Mario Lang
2002-06-15 21:29 ` Eric Gillespie [this message]
2002-06-15 23:06 ` Bart Schaefer

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=20020615212919.29113A2C8@romulus.pretzelnet.org \
    --to=epg@pretzelnet.org \
    --cc=mlang@delysid.org \
    --cc=zsh-users@sunsite.auc.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).