zsh-workers
 help / Atom feed
* [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

* Re: [PATCH] _alternative: Fix (...) action syntax
  2018-12-22  8:07 [PATCH] _alternative: Fix (...) action syntax dana
@ 2018-12-22 18:54 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2018-12-22 18:54 UTC (permalink / raw)
  To: zsh-workers

dana wrote on Sat, 22 Dec 2018 02:07 -0600:
> PS: Sorry for bug/patch spam, lots of unstructured holiday free time here

What kind of alternative universe did I wake up in today where people
apologize for sending patches to an open source project?  Thanks for
the patches, dana!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

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

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/ public-inbox