Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _arguments description problem
- X-seq: zsh-workers 16982
- From: Sven Wischnowsky <wischnow@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: _arguments description problem
- Date: Mon, 15 Apr 2002 09:54:47 +0200
- In-reply-to: <1018778989.3134.13.camel@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1018778989.3134.13.camel@xxxxxxxxxxxxxxxxxxxxx>
Borsenkow Andrej wrote:
> ...
>
> Which means that _wanted (and related functions) probably needs some way
> to know if it needs to setup description or not. I wonder, does it make
> sense to parse arguments (in this case "$@" -k userdirs) and if standard
> completion options are already there, do not override them? Seems like
> the least intrusive solution.
Actually, I have already added a mechanism for that, see the
description for _all_labels in the docs (which is referred to under
_requested, which is referred to under _wanted). If the command-args
given to any of these functions contains a `-', the options are added
before it, if the hyphen is the last argument, it is replaced with the
options. And since latter options override earlier onces for compadd,
clean functions should probably use things like:
_wanted users expl user compadd "$@" -k userdirs -
(note the added `-' at the end)
But I have to admit that I always forget to do that, too. Sorry.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author