From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4103 invoked from network); 23 Jan 2002 15:24:59 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Jan 2002 15:24:59 -0000 Received: (qmail 19742 invoked by alias); 23 Jan 2002 15:24:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4616 Received: (qmail 19727 invoked from network); 23 Jan 2002 15:24:42 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15438.54627.391890.885390@wischnow.berkom.de> Date: Wed, 23 Jan 2002 16:23:15 +0100 To: zsh-users@sunsite.dk Subject: Re: completion for rsync? In-Reply-To: <20020123150253.GA13879@argo.cit.nih.gov> References: <20020122191915.GA25925@argo.cit.nih.gov> <15438.30441.817950.156120@wischnow.berkom.de> <20020123150253.GA13879@argo.cit.nih.gov> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid Anthony R Iano-Fletcher wrote: > ... > > 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..... No, just the simple: _arguments ... \ # option descriptions here '*:host name:_hosts' and nothing below that. But of course, that can only be a first try at _rsync, given its complicated syntax, not all of which can be done with _arguments. So there probably should be either a state handling or a local utility function (called instead of the _hosts above) to handle the `[user@]host:(:|)(src|dest)' syntax. For some of this, there are already utility functions, looking at how _ssh handles scp might help here. > I'm attaching the next version...... criticism is welcome. > > Do I still need this line? > > > local expl hosts With the change I described above: no. In your version `expl' is still used (second argument to _wanted). Bye Sven -- Sven Wischnowsky wischnow@berkom.de