Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: optional argument?



In article <200004250945.LAA03283@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
  Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> At the weekend I hacked on _arguments (and comparguments) to allow
> _arguments to complete more than one action when appropriate. And the
> case above is of course one of cases where it is done.

It's good change, in general.  But I found a problem.

Z(4):akr@serein% Src/zsh -f  
serein% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
serein% _tst () { _arguments '-o:o:(o)' ':a:(a)' } 
serein% tst -o <TAB>
a   o

It shouldn't complete `a' because `o' is not optional.
-- 
Tanaka Akira



Messages sorted by: Reverse Date, Date, Thread, Author