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

Help with completion of option arguments



Hey,

I have a command for which I'm trying to write a completion widget. 
The command has options that take arguments that must follow the
option without any white space.  For example, the command takes
options such as these: `-A', `-Aa', `-B', and `-Bb'.  But these option
arguments are invalid because of the space: `-A a' and `-B b'.  I have
figured out how to enable the completion for `-A' and `-B' before any
space is entered with a command such as this:

_arguments -C \
    "-A-[this is a test]:test:((a\:'test sub-message'))"
    "-B-[notify (e-mail) admins]:notify:((
          b\:'suppress interactive query (for use in crontab)'))"

But the problem is, with only a single argument like this, after
typing `-A' or `-B', the sole completion `a' and `b' are run rather
than outputting the descriptions.

Is there some way to get _arguments to output the messages `test
sub-message' and `suppress interactive query (for use in crontab)'
when `-A' or `-B' have been input rather than completing them
directly?

TIA.

-- 

Regards,

Travis Spencer
Portland, OR USA



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