Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: space quoting again
- X-seq: zsh-workers 6825
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: space quoting again
- Date: Thu, 24 Jun 1999 14:46:45 +0200 (MET DST)
- In-reply-to: "Andrej Borsenkow"'s message of Thu, 24 Jun 1999 12:24:56 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> bor@itsrm2:~%> cd /a/s/S/4<TAB>
> 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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author