From: Anthony R Iano-Fletcher <Anthony.Iano-Fletcher@cbel.cit.nih.gov>
To: Sven Wischnowsky <wischnow@berkom.de>
Cc: zsh-users@sunsite.dk
Subject: Re: completion for rsync?
Date: Wed, 23 Jan 2002 10:02:53 -0500 [thread overview]
Message-ID: <20020123150253.GA13879@argo.cit.nih.gov> (raw)
In-Reply-To: <15438.30441.817950.156120@wischnow.berkom.de>
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]
Hello
Thank you, Sven, for your comments.
> > #compdef fping
> >
> >
> > _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')?
I removed the '&& ret=0'. I followed the recipe from another completion
function... hence the extra cruft. Likewise I have some extra colons in
the options.
You mean something like:
_wanted hosts expl 'host name' _hosts
That does work better.....
I'm attaching the next version...... criticism is welcome.
Do I still need this line?
> > local expl hosts
I am just starting to get to grips with the new completion stuff after
putting it off for years. You've all done a great job with the default
completions that most of the job is done. Thanks.
Anthony.
--
Anthony R Iano-Fletcher Anthony.Iano-Fletcher@nih.gov
http://cbel.cit.nih.gov/~arif
CBEL, CIT, NIH, Bethesda, MD, USA.
Phone: (+1) 301 402 1741.
[-- Attachment #2: _fping --]
[-- Type: text/plain, Size: 1185 bytes --]
#compdef fping
local expl hosts
_arguments -C \
'-a[show targets that are alive]' \
'-A[show targets by address]' \
'-v[show version]' \
'-b n[amount of ping data to send, in bytes (default 56)]:' \
'-B f[set exponential backoff factor to f]:' \
'-c n[count of pings to send to each target (default 1)]:' \
'-C n[same as -c, report results in verbose format]:' \
'-e[show elapsed time on return packets]' \
'-f[read list of targets from a file ( - means stdin)]:_file' \
'-i n[interval between sending ping packets (in millisec) (default 25)]:' \
'-l[loop sending pings forever]' \
'-m[ping multiple interfaces on target host]' \
'-n[show targets by name (-d is equivalent)]' \
'-p n[interval between ping packets to one target (in millisec) (in looping and counting modes, default 1000)]:' \
'-q[quiet (dont show per-target/per-ping results)]' \
'-Q n[same as -q, but show summary every n seconds]:' \
'-r n[number of retries (default 3)]:' \
'-s[print final stats]' \
'-t n[individual target initial timeout (in millisec) (default 500)]:' \
'-u[show targets that are unreachable]'
_wanted hosts expl 'host name' _hosts
next prev parent reply other threads:[~2002-01-23 15:17 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
2002-01-23 15:02 ` Anthony R Iano-Fletcher [this message]
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=20020123150253.GA13879@argo.cit.nih.gov \
--to=anthony.iano-fletcher@cbel.cit.nih.gov \
--cc=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).