From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17850 invoked from network); 24 Jun 1999 12:47:02 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Jun 1999 12:47:02 -0000 Received: (qmail 7197 invoked by alias); 24 Jun 1999 12:46:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6825 Received: (qmail 7190 invoked from network); 24 Jun 1999 12:46:52 -0000 Date: Thu, 24 Jun 1999 14:46:45 +0200 (MET DST) Message-Id: <199906241246.OAA31779@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Thu, 24 Jun 1999 12:24:56 +0400 Subject: Re: space quoting again Andrej Borsenkow wrote: > bor@itsrm2:~%> cd /a/s/S/4 > bor@itsrm2:~%> cd /archive/sni/SAP R3/4.0B/ Forgot to quote the path prefix/suffix. And then I found a place where I forgot to re-calculate the length of the match added. Bye Sven diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c --- os/Zle/zle_tricky.c Thu Jun 24 11:47:19 1999 +++ Src/Zle/zle_tricky.c Thu Jun 24 14:43:42 1999 @@ -3816,6 +3816,10 @@ lpre = quotename(lpre, NULL); lsuf = quotename(lsuf, NULL); } + if (dat->ppre) + dat->ppre = quotename(dat->ppre, NULL); + if (dat->psuf) + dat->psuf = quotename(dat->psuf, NULL); } /* Walk through the matches given. */ for (; (s = *argv); argv++) { @@ -3841,8 +3845,10 @@ } } if (!(dat->aflags & CAF_MATCH)) { - ms = ((dat->aflags & CAF_QUOTE) ? dupstring(s) : - quotename(s, NULL)); + if (dat->aflags & CAF_QUOTE) + ms = dupstring(s); + else + sl = strlen(ms = quotename(s, NULL)); lc = bld_parts(ms, sl, -1, NULL); isexact = 0; } else if (!(ms = comp_match(lpre, lsuf, s, cp, &lc, -- Sven Wischnowsky wischnow@informatik.hu-berlin.de