From e75c59f7f5eb2f2d69a0aa346e80a7dc0463dee6 Mon Sep 17 00:00:00 2001 From: dana Date: Sun, 23 Dec 2018 07:36:11 -0600 Subject: 43928: _alternative: Evaluate (...) action syntax as with _arguments --- ChangeLog | 5 +++++ Completion/Base/Utility/_alternative | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d277ede21..ac8524bd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-12-17 dana + + * 43928: Completion/Base/Utility/_alternative: Evaluate (...) + action syntax as with _arguments + 2018-12-21 Bart Schaefer * 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. -- cgit 1.4.1