Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug with parameter expansion
- X-seq: zsh-workers 8569
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Bug with parameter expansion
- Date: Fri, 5 Nov 1999 16:09:15 +0100 (MET)
- In-reply-to: Tanaka Akira's message of 05 Nov 1999 23:52:25 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Tanaka Akira wrote:
> In article <199911051251.NAA03010@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
> Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
>
> > Hm. As far as I know, even though `=' is in `SPECCHARS', it is only
> > special if it is at the beginning of a word. So the patch makes it be
> > quoted only then.
>
> It's also special just after colon or equal when magicequalsubst is
> set.
Jesses. I really wasn't thinking, was I?
> Maybe, `~' should be treated as `='?
Yep.
Bye
Sven
diff -u oldsrc/utils.c Src/utils.c
--- oldsrc/utils.c Fri Nov 5 13:52:21 1999
+++ Src/utils.c Fri Nov 5 16:07:09 1999
@@ -3073,7 +3073,10 @@
}
continue;
}
- else if (ispecial(*u) && (*u != '=' || u == s) &&
+ else if (ispecial(*u) &&
+ ((*u != '=' && *u != '~') ||
+ (u == s || (isset(MAGICEQUALSUBST) &&
+ (u[-1] == '=' || u[-1] == ':')))) &&
(!instring ||
(isset(BANGHIST) && *u == (char)bangchar) ||
(instring == 2 &&
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author