zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Tanaka Akira <akr@m17n.org>, zsh-workers@sunsite.auc.dk
Subject: Re: tag-order problem.
Date: Tue, 30 May 2000 17:12:32 +0000	[thread overview]
Message-ID: <1000530171232.ZM8302@candle.brasslantern.com> (raw)
In-Reply-To: <hvo8zwsxgml.fsf@serein.m17n.org>

On May 30, 11:22pm, Tanaka Akira wrote:
} Subject: tag-order problem.
}
} I found that tag-order prevents some of completions.

(Peter, I'm afraid you're going to have to re-do this release.  Good thing
you didn't "really" announce it yet.)

} Z(3):akr@serein% Src/zsh -f
} serein% bindkey -e;autoload -U compinit; compinit -D
} serein% zstyle ':completion:*' tag-order '*:label' 
} serein% which <TAB>
} 
} This completes nothing.

I used the example of completing after `lynx' because _lynx has not been
edited since before this broke, whereas _which was changed recently.

The problem is with the change to _arguments to use a counter instead of
a shift when going around this nested loop:

    while _tags; do
      anum=1
      while [[ anum -le  $#descrs ]]; do

	action="$actions[anum]"
	descr="$descrs[anum]"
	subc="$subcs[anum++]"

        # lots deleted
      done
      # lots more deleted
    done

In the previous implementation, `shift descrs' at the point where I've put
`# lots deleted' would mean that the inner while loop consumed all the
descriptions on the first time around the _tags loop, so they were not
tried again for the second and succeeding tags.  Now, all the descriptions
are tried for every tag.  I'm not sure if that's what Sven intended, but
it breaks the `all tags not explicitly selected are tried last' behavior
in some way.

As a fast workaround, stick `descrs=()' after the inner `done', i.e. where
I've got `#lots more deleted' in the snippet above.  That's probably not
the correct fix ....

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2000-05-30 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-30 14:22 Tanaka Akira
2000-05-30 17:12 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-11 10:48 Borsenkow Andrej
2002-05-13  9:09 ` Sven Wischnowsky
2002-05-14  8:06 ` Sven Wischnowsky
2000-05-10 16:56 Tanaka Akira

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=1000530171232.ZM8302@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=akr@m17n.org \
    --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).