From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2661 invoked from network); 30 May 2000 17:13:01 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 May 2000 17:13:01 -0000 Received: (qmail 22755 invoked by alias); 30 May 2000 17:12:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11671 Received: (qmail 22748 invoked from network); 30 May 2000 17:12:48 -0000 From: "Bart Schaefer" Message-Id: <1000530171232.ZM8302@candle.brasslantern.com> Date: Tue, 30 May 2000 17:12:32 +0000 In-Reply-To: Comments: In reply to Tanaka Akira "tag-order problem." (May 30, 11:22pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Tanaka Akira , zsh-workers@sunsite.auc.dk Subject: Re: tag-order problem. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 } } 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