summary refs log tree commit diff
path: root/Completion/Builtins
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Builtins')
-rw-r--r--Completion/Builtins/_vars16
-rw-r--r--Completion/Builtins/_zstyle5
2 files changed, 9 insertions, 12 deletions
diff --git a/Completion/Builtins/_vars b/Completion/Builtins/_vars
index 501e37b4f..dece0fecb 100644
--- a/Completion/Builtins/_vars
+++ b/Completion/Builtins/_vars
@@ -6,20 +6,12 @@
 local ret=1
 
 if [[ $PREFIX = *\[* ]]; then
-  local var=${PREFIX%%\[*}
-  local elt="${PREFIX#*\]}${SUFFIX%\]}"
-  local addclose
+  compstate[parameter]=${PREFIX%%(|\\)\[*}
 
-  compset -p $(( ${#var} + 1 ))
-  if ! compset -S \]; then
-    addclose=(-S "${${QIPREFIX:+]}:-\]}")
-  fi
-  if [[ ${(tP)var} = assoc* ]]; then
-    local expl
+  IPREFIX=${PREFIX%%\[*}\[
+  PREFIX=${PREFIX#*\[}
 
-    _wanted -C subscript association-keys expl 'association key' \
-        compadd $addclose -k "$var"
-  fi
+  _subscript -q
 else
   _parameters -g '^a*' "$@" && ret=0
   
diff --git a/Completion/Builtins/_zstyle b/Completion/Builtins/_zstyle
index 3a485f0da..62e5369e4 100644
--- a/Completion/Builtins/_zstyle
+++ b/Completion/Builtins/_zstyle
@@ -25,6 +25,7 @@ styles=(
   domains                c:
   expand		 c:
   fake			 c:fake
+  fake-parameters	 c:fake-params
   file-patterns		 c:filepat
   file-sort              c:fsort
   force-list             c:
@@ -269,6 +270,10 @@ while [[ -n $state ]]; do
       _message 'prefix and names'
       ;;
 
+    fake-params)
+      _message 'name and optional type'
+      ;;
+
     ignline) 
       _wanted values expl boolean compadd true false current current-shown other
       ;;