From: Tanaka Akira <akr@m17n.org>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: _arguments problems
Date: 10 May 2000 19:01:38 +0900 [thread overview]
Message-ID: <hvoln1ik9kt.fsf@serein.m17n.org> (raw)
In-Reply-To: <200005100920.LAA13270@beta.informatik.hu-berlin.de> (Sven Wischnowsky's message of "Wed, 10 May 2000 11:20:04 +0200 (MET DST)")
In article <200005100920.LAA13270@beta.informatik.hu-berlin.de>,
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
> I don't get an error message, but I don't get the `B' inserted,
> either. The code that calculates which arguments are to be completed
> didn't take the `*pat' things into account.
Z(4):akr@serein% Src/zsh -f
serein% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
serein% _tst () { _arguments '-o:*a:a:(a)' ':A:(A)' ':B:(B)' }
serein% tst -o a <TAB>
A B
It shouln't complete `B'.
> > It completes nothing. context parameter is not set?
>
> Yes. Which part of the docs made you think it would be set? $context
> is only mentioned for the `->state' actions and only then will it be
> set.
I didn't think following paragraph is applied only when `->state' is
used. Maybe, this is my fault.
The parameter `context' will be set to the automatically
created context names. These are either strings of the
form `option-opt-n' for the n'th argument of the option
-opt, or strings of the form `argument-n' for the n'th
argument (for rest arguments the n is the string `rest').
For example, when completing the argument of the -o
option, the name is `option-o-1' and for the second normal
(non-option-) argument it is `argument-2'.
--
Tanaka Akira
next prev parent reply other threads:[~2000-05-10 10:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-10 9:20 Sven Wischnowsky
2000-05-10 10:01 ` Tanaka Akira [this message]
2000-05-10 11:51 Sven Wischnowsky
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=hvoln1ik9kt.fsf@serein.m17n.org \
--to=akr@m17n.org \
--cc=zsh-workers@sunsite.auc.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).