about summary refs log tree commit diff
path: root/Src/subst.c
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-10-08 10:09:08 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-10-08 10:09:08 +0000
commit78d7bfd94f82bb286399e4c1a0ae863999db2221 (patch)
tree65591603f14f15535987bfa8e882a4fd1883433d /Src/subst.c
parent5a00fc9b9cfd4da4daff717d77f1b9122a72ff7f (diff)
downloadzsh-78d7bfd94f82bb286399e4c1a0ae863999db2221.tar.gz
zsh-78d7bfd94f82bb286399e4c1a0ae863999db2221.tar.xz
zsh-78d7bfd94f82bb286399e4c1a0ae863999db2221.zip
Equivalence of $(...) and `...` in ${(e)...}.
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 88758aaf3..523e4e320 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -133,7 +133,7 @@ stringsubst(LinkList list, LinkNode node, int ssub, int asssub)
 		str3 = (char *)getdata(node);
 		continue;
 	    }
-	} else if ((qt = c == Qtick) || c == Tick)
+	} else if ((qt = c == Qtick) || (c == Tick ? (mult_isarr = 1) : 0))
 	  comsub: {
 	    LinkList pl;
 	    char *s, *str2 = str;
@@ -730,9 +730,12 @@ subst_parse_str(char **sp, int single, int err)
             int qt = 0;
 
 	    for (; *s; s++)
-		if (!qt && *s == Qstring)
-		    *s = String;
-                else if (*s == Dnull)
+		if (!qt) {
+		    if (*s == Qstring)
+			*s = String;
+		    else if (*s == Qtick)
+			*s = Tick;
+                } else if (*s == Dnull)
                     qt = !qt;
 	}
 	return 0;
@@ -1498,7 +1501,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
             /* This once was executed only `if (qt) ...'. But with that
              * patterns in a expansion resulting from a ${(e)...} aren't
              * tokenized even though this function thinks they are (it thinks
-             * they are because subst_parse_string() turns Qstring tokens
+             * they are because subst_parse_str() turns Qstring tokens
              * into String tokens and for unquoted parameter expansions the
              * lexer normally does tokenize patterns inside parameter
              * expansions). */