From: Oliver Kiddle <opk@zsh.org>
To: Arseny Maslennikov <ar@cs.msu.ru>
Cc: zsh-workers@zsh.org
Subject: Re: Q: _alternative's `(( w1:d1 w2:d2 ))' form
Date: Fri, 12 Nov 2021 21:09:49 +0100 [thread overview]
Message-ID: <25893-1636747789.372237@C2gS.agl2.N2lP> (raw)
In-Reply-To: <YY7BaE0FV2UW3Cg1@cello>
Arseny Maslennikov wrote:
> The doc page for _alternative (citing `info zsh`, menu item `Completion
> Functions') states:
...
> Later on, the text for _arguments advises to escape the separating
> colons between the match candidate and its description in a (( ))
> action spec, due to more complex spec parsing and further optional
> fields. A thorough reader of the docs might think the same is
> required by _alternative as well.
You're right. With _alternative, it isn't necessary to escape further
colons. If you do, it's harmless. Searching the sources _file_modes does
quote them, _diff_options and _git don't. I'd have expected to find more
uses of the feature really but I may have not used the best regex to
find them.
> Is this intentional? If yes, should we fix the doc paragraph
> on _alternative?
Yes to both of those. Patches that improve the documentation are
gratefully accepted.
Oliver
next prev parent reply other threads:[~2021-11-12 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 19:32 Arseny Maslennikov
2021-11-12 19:58 ` Arseny Maslennikov
2021-11-12 20:09 ` Oliver Kiddle [this message]
2021-11-12 21:19 ` [PATCH] Doc/Zsh/compsys.yo: clarify _alternative's action syntax Arseny Maslennikov
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=25893-1636747789.372237@C2gS.agl2.N2lP \
--to=opk@zsh.org \
--cc=ar@cs.msu.ru \
--cc=zsh-workers@zsh.org \
/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).