From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5619 invoked from network); 18 Jul 2000 08:35:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jul 2000 08:35:10 -0000 Received: (qmail 10034 invoked by alias); 18 Jul 2000 08:35:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12297 Received: (qmail 10013 invoked from network); 18 Jul 2000 08:34:57 -0000 Date: Tue, 18 Jul 2000 10:34:51 +0200 (MET DST) Message-Id: <200007180834.KAA09626@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk CC: Christoph Lange In-reply-to: Christoph Lange's message of Mon, 17 Jul 2000 15:37:52 +0200 (CEST) Subject: PATCH: Re: Bug in 3.1.9: REC_EXACT does not work with commands 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