about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-03-13 09:59:48 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-03-13 09:59:48 +0000
commit5df8ef1e438e06dbd05368281640836adee88aa6 (patch)
treeb1efb3817b24d244dc4a56c3f0ac831d90e7d907
parent712d39a2c7ce365c63c60d186d826090ed5f3f70 (diff)
downloadzsh-5df8ef1e438e06dbd05368281640836adee88aa6.tar.gz
zsh-5df8ef1e438e06dbd05368281640836adee88aa6.tar.xz
zsh-5df8ef1e438e06dbd05368281640836adee88aa6.zip
18347: fix problems with having more than one ((val\:desc ...)) style action
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Utility/_alternative5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 25505031c..00677e14c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-13  Oliver Kiddle  <opk@zsh.org>
+
+	* 18347: Completion/Base/Utility/_alternative: fix problems
+	with having more than one ((val\:desc ...)) style action
+
 2003-03-12  Oliver Kiddle  <opk@zsh.org>
 
 	* 18346: Completion/Unix/Command/_cdcd, Completion/Unix/Type/_users,
diff --git a/Completion/Base/Utility/_alternative b/Completion/Base/Utility/_alternative
index 2f3e2dbc8..c7b71d9bc 100644
--- a/Completion/Base/Utility/_alternative
+++ b/Completion/Base/Utility/_alternative
@@ -1,7 +1,7 @@
 #autoload
 
 local tags def expl descr action mesgs nm="$compstate[nmatches]" subopts
-local opt curcontext="$curcontext"
+local opt ws curcontext="$curcontext"
 
 subopts=()
 while getopts 'O:C:' opt; do
@@ -33,13 +33,12 @@ while _tags; do
 
         mesgs=( "$mesgs[@]" "${def%%:*}:$descr")
       elif [[ "$action" = \(\(*\)\) ]]; then
-        local ws
 
         # ((...)) contains literal strings with descriptions.
 
         eval ws\=\( "${action[3,-3]}" \)
 
-        _describe "$descr" ws -M 'r:|[_-]=* r:|=*' "$subopts[@]"
+        _describe -t "${def%%:*}" "$descr" ws -M 'r:|[_-]=* r:|=*' "$subopts[@]"
       elif [[ "$action" = \(*\) ]]; then
 
         # Anything inside `(...)' is added directly.