Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: magicequalsubst (Re: PATCH: make _urls magicequalsubst aware)
- X-seq: zsh-workers 11961
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: magicequalsubst (Re: PATCH: make _urls magicequalsubst aware)
- Date: Sat, 17 Jun 2000 19:46:16 +0000
- In-reply-to: <1000617193154.ZM12252@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <hvo8zw4b1hw.fsf@xxxxxxxxxxxxxxx> <1000617193154.ZM12252@xxxxxxxxxxxxxxxxxxxxxxx>
On Jun 17, 7:31pm, Bart Schaefer wrote:
} Subject: Re: PATCH: make _urls magicequalsubst aware
}
} On Jun 18, 3:34am, Tanaka Akira wrote:
} } Subject: PATCH: make _urls magicequalsubst aware
} }
} } Hm. `g:=glob' should be quoted.
}
} g:=glob should have ANYTHING of `g:' and EXPRESSION of `glob'. There's
} no expansion to be peformed on `glob'. How is the `=' getting taken to
} be part of the EXPRESSION?
This fixes that, so 11959 is now unecessary but harmless.
Index: Src/subst.c
===================================================================
@@ -307,7 +307,7 @@
mod_export void
filesub(char **namptr, int assign)
{
- char *sub = NULL, *str, *ptr;
+ char *eql = NULL, *sub = NULL, *str, *ptr;
int len;
filesubstr(namptr, assign);
@@ -316,7 +316,7 @@
return;
if (assign & PF_TYPESET) {
- if ((*namptr)[1] && (sub = strchr(*namptr + 1, Equals))) {
+ if ((*namptr)[1] && (eql = sub = strchr(*namptr + 1, Equals))) {
str = sub + 1;
if ((sub[1] == Tilde || sub[1] == Equals) && filesubstr(&str, assign)) {
sub[1] = '\0';
@@ -330,7 +330,9 @@
while ((sub = strchr(ptr, ':'))) {
str = sub + 1;
len = sub - *namptr;
- if ((sub[1] == Tilde || sub[1] == Equals) && filesubstr(&str, assign)) {
+ if (sub > eql &&
+ (sub[1] == Tilde || sub[1] == Equals) &&
+ filesubstr(&str, assign)) {
sub[1] = '\0';
*namptr = dyncat(*namptr, str);
}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author