Zsh Mailing List Archive
Messages sorted by:
Re: problem with _arguments exclusion lists
- X-seq: zsh-workers 14069
- From: Oliver Kiddle <opk@xxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: problem with _arguments exclusion lists
- Date: Mon, 23 Apr 2001 09:59:53 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200104200831.KAA14053@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Sender: kiddleo
Sven Wischnowsky wrote:
> 1) Add an option to _arguments, that says that it should always try to
> complete options after options specified with `-x-:...' or `-x+:...'.
> 2) Also, make it try completing options in those places even if the new
> _arguments-option is not given but the action for the argument
> returns non-null.
I'm happy with that.
> The `returns non-null' is, of course, problematic again if the option-
> argument has to be completed with a `->state' action. But I think if
That's a bit of a pity.
> And add a small utility function that can be put into an argument-
> action and tests if the string typed so far matches some pattern.
> For simplicity I would make it use the description given in the
I'll be interested to see how you do that. I think the function will
have wider uses than just from _arguments such as from _alternative so
it would be good if it can cope with that.
> And if a simple pattern match is enough for most
> cases, this makes it sound as if we should just add a new action-
> syntax, avoiding the need for an extra function consisting of only
I prefer the extra two-line function to extending _arguments' action
spec syntax. The function is a more general method which may be more
widely useful and it keeps things more in zsh shell syntax than in
_arguments syntax. Also, I can't see that guards on _arguments specs
would be particularly useful when matches are generated.
> Ok, would this be enough for now? Later we can, as suggested by Oliver,
> add a way to change the behaviour on a per-option basis, using the
> option from 1) as the default. If we ever meet a command that needs
> that much control.
Messages sorted by: