From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10514 invoked from network); 19 Jun 2000 11:42:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Jun 2000 11:42:26 -0000 Received: (qmail 8728 invoked by alias); 19 Jun 2000 11:42:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11981 Received: (qmail 8721 invoked from network); 19 Jun 2000 11:42:10 -0000 Date: Mon, 19 Jun 2000 13:41:42 +0200 (MET DST) Message-Id: <200006191141.NAA24327@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Mon, 19 Jun 2000 15:07:49 +0400 Subject: PATCH: Re: matching problem in 3.1.9-dev-1 Andrej Borsenkow wrote: > This does not complete: > > bor@itsrm2% l .z.d > Completing `file' > > but this does > > bor@itsrm2% l .zsh.dTAB Oh. Need to be more careful when optimising the glob patterns. Bye Sven Index: Src/Zle/computil.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v retrieving revision 1.31 diff -u -r1.31 computil.c --- Src/Zle/computil.c 2000/06/19 09:32:31 1.31 +++ Src/Zle/computil.c 2000/06/19 11:41:06 @@ -3159,7 +3159,7 @@ if (m->wlen < 0 && !m->llen && m->ralen == 1) { for (tmp = add, tl = al, mp = ms; tl; tl--, tmp++, mp++) { if (pattern_match(m->right, tmp, NULL, NULL)) { - if (*mp) { + if (*mp || (tmp == add && *tmp == '.')) { *tmp = '\0'; al = tmp - add; break; @@ -3190,7 +3190,7 @@ } } if (*add) { - char *ret = "", buf[259]; + char *ret = "", buf[259], *oadd = add; for (mp = ms; *add; add++, mp++) { if (!(m = *mp)) { -- Sven Wischnowsky wischnow@informatik.hu-berlin.de