Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Help with completion of option arguments
- X-seq: zsh-users 9057
- From: Travis Spencer <travislspencer@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Help with completion of option arguments
- Date: Fri, 8 Jul 2005 00:06:22 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=KyVzrUdOCXFxIfIAZy1eP8LbJDoqh7qkYFeBw+IbRa6sAQli3Q9ykj916UA77KAhHRSyGIbu1sNsrjlqiMsBN4Ur7fl46D/lsnmcdDt3luQmYog1hg/HYY370KmPwE5p30CgnowdmlcA1+B9VAnrs+VGyUNn1tXd9XCF7W0TlNw=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Reply-to: Travis Spencer <travislspencer@xxxxxxxxx>
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