zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Cc: Christoph Lange <langec@gmx.de>
Subject: PATCH: Re: Bug in 3.1.9: REC_EXACT does not work with commands
Date: Tue, 18 Jul 2000 10:34:51 +0200 (MET DST)	[thread overview]
Message-ID: <200007180834.KAA09626@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Christoph Lange's message of Mon, 17 Jul 2000 15:37:52 +0200 (CEST)


Christoph Lange wrote:

>   when the REC_EXACT option is set in zsh-3.1.9, it does not work with
> command names. Here is how it should be (and how it works in zsh-3.0.8):
> 
> % setopt recexact
> % cp[Tab]
> % cp _
> 
> Instead, zsh-3.1.9 ignores the option:
> 
> % setopt recexact
> % cp[Tab]
> cp	cpio	cpp

Oops. The problem was that there are two `cp's. When finding the
second one it thought that this isn't an exact match -- which is
correct, but only if the two (or more) produce different strings on
the line, e.g. because of prefixes/suffixes. So we have to make it
test that.

Bye
 Sven

Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.36
diff -u -r1.36 compcore.c
--- Src/Zle/compcore.c	2000/07/04 15:04:17	1.36
+++ Src/Zle/compcore.c	2000/07/18 08:34:36
@@ -2397,7 +2397,7 @@
 		comp_setunset(0, 0, CP_EXACTSTR, 0);
 	    }
 	    ai->exactm = cm;
-	} else if (useexact) {
+	} else if (useexact && !matcheq(cm, ai->exactm)) {
 	    ai->exact = 2;
 	    ai->exactm = NULL;
 	    if (incompfunc)

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


                 reply	other threads:[~2000-07-18  8:35 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=200007180834.KAA09626@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=langec@gmx.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).