zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: _path_files -g
Date: Thu, 13 Jan 2000 09:52:13 +0100 (MET)	[thread overview]
Message-ID: <200001130852.JAA05939@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 13 Jan 2000 06:03:29 +0900


Tanaka Akira wrote:

> In article <200001121525.QAA02658@beta.informatik.hu-berlin.de>,
>   Sven Wischnowsky <wischnow@informatik.hu-berlin.de> 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<TAB>
> 
> The last <TAB> 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


             reply	other threads:[~2000-01-13  8:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-13  8:52 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-01-12 15:27 Sven Wischnowsky
2000-01-12 15:25 Sven Wischnowsky
2000-01-12 21:03 ` Tanaka Akira
2000-01-11  8:48 Sven Wischnowsky
2000-01-11 18:34 ` Peter Stephenson
2000-01-09 18:44 Peter Stephenson

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=200001130852.JAA05939@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).