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

empty action handling of _arguments and _alternative



I found a difference of empty action handling between _arguments and
_alternative.

Z(5):akr@serein% Src/zsh -f
serein% bindkey -e; autoload -U compinit; compinit -D
serein% zstyle ':completion:*:messages' format %d
serein% compdef _tst1 tst1; _tst1 () { _arguments '-o::o:' ':a:' }
serein% compdef _tst2 tst2; _tst2 () { _alternative 'option-o-1:o:' 'argument-1:a:' }

serein% tst1 -o <TAB>
a

serein% tst2 <TAB>
o
a

_arguments shows only `a' but _alternative shows both.  They has tags
`option-o-1' and `argument-1' orderd by defafult tag-order specified
in _tags.  Is this intentional?
-- 
Tanaka Akira



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