about summary refs log tree commit diff
path: root/Completion/Base/_in_vared
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-25 07:58:44 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-25 07:58:44 +0000
commit6959ffd9621fdb8f33b53e1c0be05f3f294742a5 (patch)
tree8f3e7cf83e0787961d4369074ece179d828464ec /Completion/Base/_in_vared
parent9121d78354d0578333e4f64ac6fa96710e0bf118 (diff)
downloadzsh-6959ffd9621fdb8f33b53e1c0be05f3f294742a5.tar.gz
zsh-6959ffd9621fdb8f33b53e1c0be05f3f294742a5.tar.xz
zsh-6959ffd9621fdb8f33b53e1c0be05f3f294742a5.zip
force listing in _complete_debug; make complist with list-scrolling stopt at the end of the list when prompt would scroll it out; fix _in_vared to handle `foo[bar]' (11565)
Diffstat (limited to 'Completion/Base/_in_vared')
-rwxr-xr-xCompletion/Base/_in_vared15
1 files changed, 11 insertions, 4 deletions
diff --git a/Completion/Base/_in_vared b/Completion/Base/_in_vared
index 4d8e814db..c21601cdf 100755
--- a/Completion/Base/_in_vared
+++ b/Completion/Base/_in_vared
@@ -5,10 +5,17 @@ local also
 # Completion inside vared.
 
 if [[ $compstate[vared] = *\[* ]]; then
-  # vared on an array-element
-  compstate[parameter]=${compstate[vared]%%\[*}
-  compstate[context]=-value-
-  also=value
+  if [[ $compstate[vared] = *\]* ]]; then
+    # vared on an array-element
+    compstate[parameter]=${${compstate[vared]%%\]*}//\[/-}
+    compstate[context]=value
+    also=-value-
+  else
+    # vared on an array-value
+    compstate[parameter]=${compstate[vared]%%\[*}
+    compstate[context]=value
+    also=-value-
+  fi
 else
   # vared on a parameter, let's see if it is an array
   compstate[parameter]=$compstate[vared]