Zsh Mailing List Archive
Messages sorted by:
Re: current CVS test failure
- X-seq: zsh-workers 18527
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: current CVS test failure
- Date: Tue, 13 May 2003 15:27:56 +0200
- In-reply-to: <23075.1052819675@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <23075.1052819675@xxxxxxx>
> Oliver Kiddle wrote:
> > So your -O is probably the best solution.
Sorry to complicate this but I did another experiment and I think the
compstate[nmatches] solution would work. I had thought that a tag-order of
'options arguments' (with quotes) would cause the completion of options
to execute before arguments even though they display together but that
is not the case: they execute in the same tag loop iteration so in the
order they are defined.
So, you would just have to make sure that anything calling _describe -o
came last in the tag loop. It would actually work better though because
it then does the job for you of seeing if options are completed alone
or with other things. It would also mean that a tag-order specifying
options before something else would complete the options first even if
there was no `-' prefix. Which is I think better.
So what do we prefer - an extra, obscure -O option to _describe or the
peculiar must be last in the tag loop rule but with it working slightly
better? Or does that explanation all make no sense?
> With documentation added, it now looks like the following.
> I notice the option only affects prefix-needed, not prefix-hidden, which
> was always handled by _describe. That's probably OK as this is a matter
> for displaying.
Yes, prefix-hidden is unrelated to this issue.
> +descriptions are shown. If `tt(-O)' is used instead of `tt(-O)', command
> +options are completed as above but tt(_describe) will not handle the
> +tt(prefix-needed) style which is assumed to be handled by the calling
-O is useful in contexts where only options are valid completions and so
they should always be completed regardless of the prefix. So you might
want to use -O and not handle prefix-needed in the calling function.
Messages sorted by: