Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion for rsync?
- X-seq: zsh-users 4616
- From: Sven Wischnowsky <wischnow@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion for rsync?
- Date: Wed, 23 Jan 2002 16:23:15 +0100
- In-reply-to: <20020123150253.GA13879@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020122191915.GA25925@xxxxxxxxxxxxxxxx> <15438.30441.817950.156120@xxxxxxxxxxxxxxxxxx> <20020123150253.GA13879@xxxxxxxxxxxxxxxx>
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@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author