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: Mon, 12 May 2003 12:08:54 +0200	[thread overview]
Message-ID: <2414.1052734134@gmcs3.local> (raw)
In-Reply-To: <23086.1051710727@csr.com>

On 30 Apr, Peter wrote:
> Oliver Kiddle wrote:
> > The test is doing _arguments '-+o'. Because there are no other
> > (non-option) things being completed, it adds the -o and +o regardless
> > of the prefix. In _describe, I can't know if _arguments is completing
> > other things so I can't think of any easy solution other than checking
> > prefix-needed manually in any other function using _describe -o.
> 
> how about adding another option to _describe e.g. -O which works the
> same but doesn't test prefix-needed and only gets called from
> _arguments?

I couldn't think of a particularly better solution. A nasty hack would
involve looking at $compstate[nmatches] to see if anything else had
been completed but you can't rely on the options be completed after
whatever else. postfunctions aren't much use because they are run too
late after all the completers. In some respects prefix-needed is
actually redundant because the same can be achieved with the
ignored-patterns style.

So your -O is probably the best solution.

Oliver


  parent reply	other threads:[~2003-05-12 10:08 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 [this message]
2003-05-13  9:54         ` Peter Stephenson
2003-05-13 13:27           ` Oliver Kiddle
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=2414.1052734134@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).