zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: PATCH: choice of completers from _prefix
Date: Fri, 05 Dec 2003 11:24:49 +0100	[thread overview]
Message-ID: <2212.1070619889@gmcs3.local> (raw)

When _prefix was changed to do better looping over completers,
_completer_num was declared local at the top and used for the looping.
Unfortunately, _main_complete's _completer_num is used below this point
to work out a completer list for when the style lookup fails.

The result is _prefix defaulting to all completers following the last
_prefix instead of those before the current.

The simple fix below is to move the local declaration.

Oliver

Index: Completion/Base/Completer/_prefix
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Completer/_prefix,v
retrieving revision 1.3
diff -u -r1.3 _prefix
--- Completion/Base/Completer/_prefix	9 Jul 2003 15:53:25 -0000	1.3
+++ Completion/Base/Completer/_prefix	5 Dec 2003 10:14:27 -0000
@@ -5,7 +5,7 @@
 [[ _matcher_num -gt 1 || -z "$SUFFIX" ]] && return 1
 
 local comp curcontext="$curcontext" tmp suf="$SUFFIX" \
-      _completer _completer_num \
+      _completer \
       _matcher _c_matcher _matchers _matcher_num
 
 zstyle -a ":completion:${curcontext}:" completer comp ||
@@ -18,7 +18,7 @@
 fi
 SUFFIX=''
 
-_completer_num=1
+local _completer_num=1
 
 for tmp in "$comp[@]"; do
   if [[ "$tmp" = *:-* ]]; then


                 reply	other threads:[~2003-12-05 10:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2212.1070619889@gmcs3.local \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).