about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Base/Completer/_ignored8
-rw-r--r--Completion/Base/Completer/_prefix8
3 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b65cc2e6c..5e7b80cf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-30  Peter Stephenson  <pws@csr.com>
+
+	* 23495: Completion/Base/Completer/_ignored,
+	Completion/Base/Completer/_prefix: 23440 broken obscure
+	use of subscripting.
+
 2007-05-29  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* unposted: Src/module.c: failure adding autoload builtin
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"