Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: optional argument?
- X-seq: zsh-workers 10888
- From: Tanaka Akira <akr@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: optional argument?
- Date: 21 Apr 2000 23:49:32 +0900
- In-reply-to: <200004190800.KAA04575@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> (Sven Wischnowsky's message of "Wed, 19 Apr 2000 10:00:05 +0200 (MET DST)")
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200004190800.KAA04575@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
In article <200004190800.KAA04575@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
> > I think `optional arguments' of _arguments doesn't work now.
> The problem is the `->' case: _arguments can't `add' matches for more
> than one `->state' because it doesn't add any of them.
I realized another problem.
Suppose following situation.
% _tst () { _arguments '-o::optarg:(optarg)' ':arg1:(arg1)' ':arg2:(arg2)' }
% tst -o xxx <TAB>
Because an argument for `-o' is optional, `xxx' is an argument for the
option or first non-option argument. So, the word to be completed by
<TAB> is first non-option argument or second non-option argument.
Hence `arg1' and `arg2' should be completed. But I think this is bit
confused and not so useful.
--
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author