From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1521 invoked from network); 13 Jan 2000 08:52:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Jan 2000 08:52:24 -0000 Received: (qmail 19497 invoked by alias); 13 Jan 2000 08:52:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9305 Received: (qmail 19490 invoked from network); 13 Jan 2000 08:52:15 -0000 Date: Thu, 13 Jan 2000 09:52:13 +0100 (MET) Message-Id: <200001130852.JAA05939@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 13 Jan 2000 06:03:29 +0900 Subject: Re: PATCH: _path_files -g Tanaka Akira wrote: > In article <200001121525.QAA02658@beta.informatik.hu-berlin.de>, > Sven Wischnowsky writes: > > > The patch below implements this behaviour and replaces > > ignored-suffixes with ignored-patterns. > > I found a problem with ignored-patterns. > > Z(2):akr@is27e1u11% Src/zsh -f > is27e1u11% bindkey -e; autoload -U compinit; compinit -D > is27e1u11% zstyle ":completion*::vi:*" ignored-patterns \*\?.bbl \*\?.blg > is27e1u11% touch zz.{tex,bbl,blg} > is27e1u11% ls zz.* > zz.bbl zz.blg zz.tex > is27e1u11% vi zz.b > > The last just removes the word `zz.b' instead of listing files. I tried it only with a simple test function where it happened to succeed. The problem was that in some cases the last call to permmatches() didn't switch to the alternate set. Bye Sven diff -ru ../z.old/Src/Zle/compcore.c Src/Zle/compcore.c --- ../z.old/Src/Zle/compcore.c Wed Jan 12 16:27:37 2000 +++ Src/Zle/compcore.c Thu Jan 13 09:49:27 2000 @@ -2569,9 +2569,11 @@ static int fi = 0; int nn, nl, ll, gn = 1, mn = 1, rn; - if (pmatches && !newmatches) + if (pmatches && !newmatches) { + if (last && fi) + ainfo = fainfo; return fi; - + } newmatches = fi = 0; if (pmatches) @@ -2587,7 +2589,7 @@ } while (g) { HEAPALLOC { - if (empty(g->lmatches)) + if (fi) /* We have no matches, try ignoring fignore. */ mlist = g->lfmatches; else -- Sven Wischnowsky wischnow@informatik.hu-berlin.de