Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: still completion in quotes
- X-seq: zsh-workers 17192
- From: Sven Wischnowsky <wischnow@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: Re: still completion in quotes
- Date: Tue, 21 May 2002 09:46:27 +0200
- In-reply-to: <6134254DE87BD411908B00A0C99B044F0369C375@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6134254DE87BD411908B00A0C99B044F0369C375@xxxxxxxxxxxxxxxxxxxxxxx>
Borsenkow Andrej wrote:
> bor@itsrm2% ls
> a b c\ d uudecode
> bor@itsrm2% zsh -c "ls a\\TAB
> bor@itsrm2% zsh -c "ls aa\\*
>
> sorry?
Oh, das ist gemein ;-)
Well, yes, we had to treat that backslash-at-the-end special
elsewhere, so we have to do the same in the nested-quotes case, too.
Right.
Bye
Sven
Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.58
diff -u -r1.58 compcore.c
--- Src/Zle/compcore.c 15 May 2002 07:40:36 -0000 1.58
+++ Src/Zle/compcore.c 21 May 2002 07:45:14 -0000
@@ -1428,8 +1428,8 @@
for (p = ns, i = swb; *p; p++, i++) {
if (INULL(*p)) {
if (i < scs) {
- if (*p == Bnull && p[1]) {
- if (remq)
+ if (*p == Bnull) {
+ if (p[1] && remq)
swb -= 2;
if (odq) {
swb--;
@@ -1526,6 +1526,10 @@
untokenize(ss);
compsuffix = ztrdup(ss);
}
+ if ((i = strlen(compprefix)) &&
+ compprefix[i - 1] == '\\' && compprefix[i - 2] != '\\')
+ compprefix[i - 1] = '\0';
+
tmp = tricat(compqiprefix, compiprefix, multiquote(qp, 1));
zsfree(compqiprefix);
compqiprefix = tmp;
--
Sven Wischnowsky wischnow@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author