Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: _arguments questions
- X-seq: zsh-workers 10505
 
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
 
- To: zsh-workers@xxxxxxxxxxxxxx
 
- Subject: Re: PATCH: Re: _arguments questions
 
- Date: Wed, 5 Apr 2000 11:43:20 +0200 (MET DST)
 
- In-reply-to: Alexandre Duret-Lutz's message of 05 Apr 2000 11:28:48 +0200
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
 
Alexandre Duret-Lutz wrote:
> >>> "Sven" == Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
> 
> ...
> 
>  Sven> Because of that (;-) and because it isn't quite the same (but I
>  Sven> confess, I had the same idea...). Especially, adding this dummy
>  Sven> element might be useful to combine with both `::' and `:::'.
> 
> An helper function ?
> 
>   _with_dummy_arg0 () {  #  I'm not good at finding names...
>        words=(dummy $words)
>        (( ++CURRENT ))
>        $@
>   }
> 
>   _arguments -a -b '-c:*::blah: _with_dummy_arg0 _arguments -c -d -e'
I thought about that, too. And then thought this could easily be put
in _arguments, i.e. make it just look for a certain prefix in the
action -- as if there were a function called. I couldn't find another
use for this dummy-insertion-function...
> Quite ugly, but looks understandable.  But taht way we can't get
> the 'parent' option (-c) for the dummy as you suggested.
We could. _arguments itself would probably use the same it puts into
$curcontext... (which in turn made me think that this wasn't so clever 
an idea anyway).
Bye
 Sven
--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author