about summary refs log tree commit diff
path: root/Completion/Base
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base')
-rw-r--r--Completion/Base/Completer/_ignored8
-rw-r--r--Completion/Base/Completer/_prefix8
2 files changed, 12 insertions, 4 deletions
diff --git a/Completion/Base/Completer/_ignored b/Completion/Base/Completer/_ignored
index 1ae2e2846..00dfc42f4 100644
--- a/Completion/Base/Completer/_ignored
+++ b/Completion/Base/Completer/_ignored
@@ -5,9 +5,13 @@
 [[ _matcher_num -gt 1 || $compstate[ignored] -eq 0 ]] && return 1
 
 local comp
+integer ind
 
-zstyle -a ":completion:${curcontext}:" completer comp ||
-  comp=( "${(@)_completers[1,_completer_num-1][(R)_ignored(|:*),-1]}" )
+if ! zstyle -a ":completion:${curcontext}:" completer comp; then
+  comp=( "${(@)_completers[1,_completer_num-1]}" )
+  ind=${comp[(I)_ignored(|:*)]}
+  (( ind )) && comp=("${(@)comp[ind,-1]}")
+fi
 
 local _comp_no_ignore=yes tmp expl \
       _completer _completer_num \
diff --git a/Completion/Base/Completer/_prefix b/Completion/Base/Completer/_prefix
index c17b381e3..74be5f47d 100644
--- a/Completion/Base/Completer/_prefix
+++ b/Completion/Base/Completer/_prefix
@@ -7,9 +7,13 @@
 local comp curcontext="$curcontext" tmp suf="$SUFFIX" \
       _completer \
       _matcher _c_matcher _matchers _matcher_num
+integer ind
 
-zstyle -a ":completion:${curcontext}:" completer comp ||
-  comp=( "${(@)_completers[1,_completer_num-1][(R)_prefix(|:*),-1]}" )
+if ! zstyle -a ":completion:${curcontext}:" completer comp; then
+  comp=( "${(@)_completers[1,_completer_num-1]}" )
+  ind=${comp[(I)_prefix(|:*)]}
+  (( ind )) && comp=("${(@)comp[ind,-1]}")
+fi
 
 if zstyle -t ":completion:${curcontext}:" add-space; then
   ISUFFIX=" $SUFFIX"