From: Travis Spencer <travislspencer@gmail.com>
To: zsh-users@sunsite.dk
Subject: Re: Help with completion of option arguments
Date: Sat, 9 Jul 2005 01:42:07 -0700 [thread overview]
Message-ID: <e3b7bac05070901427d4af7e4@mail.gmail.com> (raw)
In-Reply-To: <1050709070248.ZM17162@candle.brasslantern.com>
On 7/9/05, Bart Schaefer <schaefer@brasslantern.com> wrote:
> I mention this to point out that it's almost always better to show the
> real example you're working with, rather than attempt to make up an
> equivalent one. The exception would be when you're showing a minimal
> test case for a bug, but then you should have tried the example to be
> sure it demonstrates what you intend it to.
OK. I'll do that next time for sure. Sorry about the confusion. The
completion, which is my first, is at
http://www.travisspencer.com/scripts/_snot.txt. I'm kinda pleased
with the way it turned out. Thanks for all the help with it, Bart!
> By the way, does your call to _arguments use the ->state mechanism at
> any point? If not, you don't need the -C in there.
Ya, I am using the state mechanism.
> However, the literal answer to your question ...
>
> } 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?
>
> ... is, insert an empty string element into the double-parens like this:
>
> _arguments : \
> "-A-[this is a test]:test:(('' a\:'test sub-message'))" \
> "-B-[notify (e-mail) admins]:notify:((''
> b\:'suppress interactive query (for use in crontab)'))"
Wow. Tricky. I would never have figured that out on my own.
--
Regards,
Travis Spencer
Portland, OR USA
next prev parent reply other threads:[~2005-07-09 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-08 7:06 Travis Spencer
2005-07-09 7:02 ` Bart Schaefer
2005-07-09 8:42 ` Travis Spencer [this message]
2005-07-09 17:21 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3b7bac05070901427d4af7e4@mail.gmail.com \
--to=travislspencer@gmail.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).