* [PATCH] _alternative: Fix (...) action syntax
@ 2018-12-22 8:07 dana
2018-12-22 18:54 ` Daniel Shahaf
0 siblings, 1 reply; 2+ messages in thread
From: dana @ 2018-12-22 8:07 UTC (permalink / raw)
To: Zsh workers
A long time ago Oliver found that _alternative didn't handle the ((...\:...))
action syntax properly, and that was fixed in workers/18347. But it also
didn't handle (...) properly, and i think the same kind of fix is probably
warranted (just copy/paste from _arguments basically). So here's that
PS: Sorry for bug/patch spam, lots of unstructured holiday free time here
dana
diff --git a/Completion/Base/Utility/_alternative b/Completion/Base/Utility/_alternative
index bfb34a604..3c61d1125 100644
--- a/Completion/Base/Utility/_alternative
+++ b/Completion/Base/Utility/_alternative
@@ -43,8 +43,10 @@ while _tags; do
# Anything inside `(...)' is added directly.
+ eval ws\=\( "${action[2,-2]}" \)
+
_all_labels "${def%%:*}" expl "$descr" \
- compadd "$subopts[@]" - ${=action[2,-2]}
+ compadd "$subopts[@]" -a - ws
elif [[ "$action" = \{*\} ]]; then
# A string in braces is evaluated.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-22 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-22 8:07 [PATCH] _alternative: Fix (...) action syntax dana
2018-12-22 18:54 ` Daniel Shahaf
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).