zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: _configure completion weirdness
Date: Mon, 29 May 2000 11:13:29 +0200 (MET DST)	[thread overview]
Message-ID: <200005290913.LAA04209@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Mon, 29 May 2000 11:07:17 +0400


Andrej Borsenkow wrote:

> With current CVS (hey, I'm already running 3.1.7! :-))) I get very funny
> result.
> 
> ./configure --pre=/to
> 
> completes to --prefix=/tools as expected, but
> 
> ./configure --prefix=/to
> 
> does not!
> 
> This seems to be the result of
> 
> zstyle ':completion:*:*:configure:*' tag-order 'options:-with:with\
> options options:-other:other\ options' 'options:-without:without\
> options'

Oops. We shouldn't empty the arrays if we may still need them...

Bye
 Sven

Index: Completion/Base/_arguments
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_arguments,v
retrieving revision 1.24
diff -u -r1.24 _arguments
--- Completion/Base/_arguments	2000/05/29 08:00:46	1.24
+++ Completion/Base/_arguments	2000/05/29 09:12:54
@@ -168,7 +168,7 @@
 if (( $# )) && comparguments -i "$autod" "$@"; then
   local action noargs aret expl local tried
   local next direct odirect equal single matcher matched ws tmp1 tmp2 tmp3
-  local opts subc tc prefix suffix descrs actions subcs
+  local opts subc tc prefix suffix descrs actions subcs anum
   local origpre="$PREFIX" origipre="$IPREFIX" nm="$compstate[nmatches]"
 
   if comparguments -D descrs actions subcs; then
@@ -203,11 +203,12 @@
 
   while true; do
     while _tags; do
-      while (( $#descrs )); do
+      anum=1
+      while [[ anum -le  $#descrs ]]; do
 
-	action="$actions[1]"
-	descr="$descrs[1]"
-	subc="$subcs[1]"
+	action="$actions[anum]"
+	descr="$descrs[anum]"
+	subc="$subcs[anum++]"
 
         if [[ -n "$matched" ]] || _requested "$subc"; then
 
@@ -293,9 +294,6 @@
             fi
           fi
         fi
-        shift descrs
-        shift actions
-        shift subcs
       done
 
       if [[ -z "$matched$hasopts" ]] && _requested options &&

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


                 reply	other threads:[~2000-05-29  9:13 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=200005290913.LAA04209@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.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).