* PATCH: Re: Bug in 3.1.9: REC_EXACT does not work with commands
@ 2000-07-18 8:34 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-07-18 8:34 UTC (permalink / raw)
To: zsh-workers; +Cc: Christoph Lange
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-07-18 8:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-18 8:34 PATCH: Re: Bug in 3.1.9: REC_EXACT does not work with commands Sven Wischnowsky
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).