summary refs log tree commit diff
diff options
context:
space:
mode:
authordana <dana@dana.is>2018-12-23 07:36:11 -0600
committerdana <dana@dana.is>2018-12-23 07:36:11 -0600
commite75c59f7f5eb2f2d69a0aa346e80a7dc0463dee6 (patch)
tree2e15dc953502339c4b53be05c94faa431663cd3c
parentc19a0927e1b95289033e504cb44994feffad1091 (diff)
downloadzsh-e75c59f7f5eb2f2d69a0aa346e80a7dc0463dee6.tar.gz
zsh-e75c59f7f5eb2f2d69a0aa346e80a7dc0463dee6.tar.xz
zsh-e75c59f7f5eb2f2d69a0aa346e80a7dc0463dee6.zip
43928: _alternative: Evaluate (...) action syntax as with _arguments
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Utility/_alternative4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d277ede21..ac8524bd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-17  dana  <dana@dana.is>
+
+	* 43928: Completion/Base/Utility/_alternative: Evaluate (...)
+	action syntax as with _arguments
+
 2018-12-21  Bart Schaefer  <schaefer@zsh.org>
 
 	* 43921: ${\var} should be an error
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.