Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: _arguments questions
- X-seq: zsh-workers 10504
- From: Alexandre Duret-Lutz <duret_g@xxxxxxxx>
- To: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: Re: _arguments questions
- Date: 05 Apr 2000 11:28:48 +0200
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: Sven Wischnowsky's message of "Wed, 5 Apr 2000 10:11:57 +0200 (MET DST)"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200004050811.KAA01592@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
>>> "Sven" == Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
Sven> Alexandre Duret-Lutz wrote:
[...]
>> _arguments -a -b '-c:*::::blah: _arguments -c -d -e'
>>
>> Horrible !
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'
Quite ugly, but looks understandable. But taht way we can't get
the 'parent' option (-c) for the dummy as you suggested.
[...]
--
Alexandre Duret-Lutz
Messages sorted by:
Reverse Date,
Date,
Thread,
Author