Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Q: _alternative's `(( w1:d1 w2:d2 ))' form
- X-seq: zsh-workers 49574
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Arseny Maslennikov <ar@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Q: _alternative's `(( w1:d1 w2:d2 ))' form
- Date: Fri, 12 Nov 2021 21:09:49 +0100
- Archived-at: <https://zsh.org/workers/49574>
- In-reply-to: <YY7BaE0FV2UW3Cg1@cello>
- List-id: <zsh-workers.zsh.org>
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author