Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _arguments: repeated option with multiple optargs
- X-seq: zsh-users 10744
- From: Peter Stephenson <pws@xxxxxxx>
- To: Roman Neuhauser <neuhauser@xxxxxxxxxx>, zsh-users@xxxxxxxxxx (Zsh users list)
- Subject: Re: _arguments: repeated option with multiple optargs
- Date: Wed, 20 Sep 2006 10:10:37 +0100
- In-reply-to: <20060919225628.GA46070@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060919014639.GB29030@xxxxxxxxxxxxxxxx> <20060919172825.3f7c6232.pws@xxxxxxx> <20060919225628.GA46070@xxxxxxxxxxxxxxxx>
Roman Neuhauser wrote:
> That reminds me: the message part of optarg must not be empty,
> otherwise I get no completions, is that a bug?
Generally two colons together mean special things. It should work if
there's at least a space, otherwise it's certainly a bug.
> I looked inside _arguments, it contains (4.2.5) 10 calls to
> comparguments, but zsh/computil is basically undocumented with the
> excuse that it's "not very interesting" to users. Funny.
Yes, that's a real nuisance in working out what's going on.
> Thinking some more... In "tence -r file t1 <CURSOR>", _complete_help
> says the $context is ":completion::complete:tence::option-r-rest:".
> How can I access the value from inside my completion function? I
> thought I saw this info somewhere, but cannot find it. I'd like to
> see what happens if I change the argument member from option-r-rest
> to "" before the call to _arguments, IFF $words[$CURRENT] is "-".
You need to manipulate curcontext. The usual idiom is
local curcontext="${curcontext}:extra:bits"
or something.
> BTW, you sent this only to me. Was that intentional?
No, I passed on the mail to the list (and this one, too).
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author