Zsh Mailing List Archive
Messages sorted by:
Re: PATCH: Re: _arguments questions
- X-seq: zsh-workers 10474
- From: Alexandre Duret-Lutz <duret_g@xxxxxxxx>
- To: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: Re: _arguments questions
- Date: 04 Apr 2000 17:59:56 +0200
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: Sven Wischnowsky's message of "Tue, 4 Apr 2000 14:54:22 +0200 (MET DST)"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200004041254.OAA09834@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
>>> "Sven" == Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
Sven> Alexandre Duret-Lutz wrote:
>> 1) is there a simplier way to nest `_arguments' ?
Sven> I don't see any. Sorry. Adding more syntactic sugar to the
Sven> _argument specs to support this doesn't seem worth it unless we put
Sven> it into the <action>. Then it's quite simple (making _arguments
Sven> insert the dummy, probably using the option name for it).
Isn't the `*pattern::message' spec quite the same ?
The `*' or
the pattern may also be separated from the
message by two or three colons. With two
colons the words special array and the CUR
RENT special parameter are modified to refer
only to the words after the option (with two
What we want here is that `words' and `CURRENT' refer to the
words after the option, *including the option*.
Why not a four colons separator ?
_arguments -a -b '-c:*::::blah: _arguments -c -d -e'
Sven> Should we?
I would find this helpfull, since it prevent from writting intermediate
functions (and since _argument is *the* easy way to write completion
functions, it should better nest without requiring the user to dig the
Another idea: Isn't there a way to make _arguments detect whether it has
been nested or not ? (I don't know, maybe when the <argument> part
of the context is already set ?). Of course this solve only the
_arguments nesting problem, not the more general "words and CURRENT
include the current option" behaviour.
Messages sorted by: