From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4056 invoked from network); 23 Jan 2002 15:17:35 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Jan 2002 15:17:35 -0000 Received: (qmail 18044 invoked by alias); 23 Jan 2002 15:17:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4615 Received: (qmail 18032 invoked from network); 23 Jan 2002 15:17:01 -0000 Resent-Message-Id: <200201231516.g0NFGwP20374@argo.cit.nih.gov> Date: Wed, 23 Jan 2002 10:02:53 -0500 From: Anthony R Iano-Fletcher To: Sven Wischnowsky Cc: zsh-users@sunsite.dk Subject: Re: completion for rsync? Message-ID: <20020123150253.GA13879@argo.cit.nih.gov> References: <20020122191915.GA25925@argo.cit.nih.gov> <15438.30441.817950.156120@wischnow.berkom.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <15438.30441.817950.156120@wischnow.berkom.de> User-Agent: Mutt/1.3.25i Resent-From: Anthony.Iano-Fletcher@cbel.cit.nih.gov Resent-Date: Wed, 23 Jan 2002 10:16:58 -0500 Resent-To: zsh-users@sunsite.dk --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=_fping #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 --BOKacYhQ+x31HxR3--