From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Oliver Kiddle <opk@u.genie.co.uk>, Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: return code of _arguments
Date: Sat, 24 Mar 2001 16:37:41 +0000 [thread overview]
Message-ID: <1010324163741.ZM29217@candle.brasslantern.com> (raw)
In-Reply-To: <3ABBDD5A.2DA007C6@u.genie.co.uk>
On Mar 23, 11:33pm, Oliver Kiddle wrote:
} Subject: return code of _arguments
}
} If my understanding is correct the test [[ $? = 300 ]] after _arguments
} is going to be equivalent to the test [[ -n $state ]]?
I suggested getting rid of the 300 return code once before.
Back in zsh-workers/12475, Sven wrote:
>
> No. The special return value is used by the wrappers around _arguments
> such as _x_arguments. And there we *need* to be able to distinguish
> the cases (to keep the special parameters from being reset).
>
> And anyway, the problem is not with the return value, since, as you
> observed, we use $state for tests anyway. The problem is that with
> ->state actions _arguments may have to generate matches (the options)
> and it can't know if the caller adds more matches. What I wanted is an
> easier way for calling functions to distinguish this from the case
> where _arguments generates real matches (by executing one of the other
> forms for actions). Currently this can be done by relying on the
> return value to test if `real' matches (not only options) were
> generated and then use $state to find out if a state has to be handled
> and *there* use $compstate[nmatches] to find out if options were
> completed. If needed, and it is seldom needed because in most cases
> the state doesn't have to be handled in a loop.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2001-03-24 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-23 23:33 Oliver Kiddle
2001-03-24 16:37 ` Bart Schaefer [this message]
2001-03-26 9:21 Sven Wischnowsky
2001-03-26 14:05 ` Oliver Kiddle
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=1010324163741.ZM29217@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=opk@u.genie.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).