about summary refs log tree commit diff
path: root/Completion/Base/Utility
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-10-19 10:28:07 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-10-19 10:28:07 +0000
commit2a0862bc40493312db83b368b8ba927e9183b5b9 (patch)
tree51871e5a226ef1845fc1aac2a20dbd2967ced4c5 /Completion/Base/Utility
parent62829b856d9c6b054f3c6338a20f9d5c04d79d42 (diff)
downloadzsh-2a0862bc40493312db83b368b8ba927e9183b5b9.tar.gz
zsh-2a0862bc40493312db83b368b8ba927e9183b5b9.tar.xz
zsh-2a0862bc40493312db83b368b8ba927e9183b5b9.zip
fix: make _describe handle (...) arguments correctly; use _file_descriptors after -t in conditions; don't display empty descriptions in _file_descriptors (16085)
Diffstat (limited to 'Completion/Base/Utility')
-rw-r--r--Completion/Base/Utility/_describe12
1 files changed, 10 insertions, 2 deletions
diff --git a/Completion/Base/Utility/_describe b/Completion/Base/Utility/_describe
index 9ad04c224..fea3ee569 100644
--- a/Completion/Base/Utility/_describe
+++ b/Completion/Base/Utility/_describe
@@ -54,7 +54,11 @@ while _tags; do
       while (( $# )); do
     
         _strs="_a_$_try$_i"
-        eval local "_a_$_try$_i;_a_$_try$_i"'=( "${'$1'[@]}" )'
+        if [[ "$1" = \(*\) ]]; then
+          eval local "_a_$_try$_i;_a_$_try$_i"'='$1
+        else
+          eval local "_a_$_try$_i;_a_$_try$_i"'=( "${'$1'[@]}" )'
+        fi
         _argv[_i]="_a_$_try$_i"
         shift
         (( _i++ ))
@@ -63,7 +67,11 @@ while _tags; do
           _mats=
         else
           _matss="_a_$_try$_i"
-          eval local "_a_$_try$_i;_a_$_try$_i"'=( "${'$1'[@]}" )'
+          if [[ "$1" = \(*\) ]]; then
+            eval local "_a_$_try$_i;_a_$_try$_i"'='$1
+          else
+            eval local "_a_$_try$_i;_a_$_try$_i"'=( "${'$1'[@]}" )'
+          fi
           _argv[_i]="_a_$_try$_i"
           shift
           (( _i++ ))