From: Sven Wischnowsky <wischnow@berkom.de>
To: zsh-users@sunsite.dk
Subject: Re: completion for rsync?
Date: Wed, 23 Jan 2002 09:40:09 +0100 [thread overview]
Message-ID: <15438.30441.817950.156120@wischnow.berkom.de> (raw)
In-Reply-To: <20020122191915.GA25925@argo.cit.nih.gov>
Anthony R Iano-Fletcher wrote:
> ...
>
> #compdef fping
>
> local expl hosts
>
> _arguments -C \
> ...
> '-u[show targets that are unreachable]:' \
> && ret=0
Shouldn't the follwing be replaced by an argument-spec calling _hosts
(it's the same code anyway) and the `&& ret=0' be removed (it's not
defined as a local and not initialised to `1')?
> if ! zstyle -a ":completion:${curcontext}:hosts" hosts hosts; then
> (( $+_cache_hosts )) ||
> : ${(A)_cache_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
>
> hosts=( "$_cache_hosts[@]" )
> fi
>
> _wanted hosts expl host \
> compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" -a hosts
Bye
Sven
--
Sven Wischnowsky wischnow@berkom.de
next prev parent reply other threads:[~2002-01-23 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-22 19:19 Anthony R Iano-Fletcher
2002-01-22 19:54 ` Bart Schaefer
2002-01-23 8:40 ` Sven Wischnowsky [this message]
2002-01-23 15:02 ` Anthony R Iano-Fletcher
2002-01-23 15:23 ` Sven Wischnowsky
2002-01-23 15:38 ` completion for fping (not rsync)? Anthony R Iano-Fletcher
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=15438.30441.817950.156120@wischnow.berkom.de \
--to=wischnow@berkom.de \
--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).