zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: current CVS test failure
Date: Tue, 13 May 2003 15:27:56 +0200	[thread overview]
Message-ID: <3901.1052832476@gmcs3.local> (raw)
In-Reply-To: <23075.1052819675@csr.com>

Peter wrote:
> 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
> +function.

-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.

Oliver


  reply	other threads:[~2003-05-13 13:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-30  6:41 Borzenkov Andrey
2003-04-30  9:29 ` Peter Stephenson
2003-04-30 13:39   ` Oliver Kiddle
2003-04-30 13:52     ` Peter Stephenson
2003-04-30 14:30       ` Oliver Kiddle
2003-05-12 10:08       ` Oliver Kiddle
2003-05-13  9:54         ` Peter Stephenson
2003-05-13 13:27           ` Oliver Kiddle [this message]
2003-05-14  9:33             ` Peter Stephenson
2003-05-28 15:15             ` Oliver Kiddle
2003-04-30 13:56     ` Oliver Kiddle
2003-04-30 14:01       ` Borzenkov Andrey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3901.1052832476@gmcs3.local \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).