about summary refs log tree commit diff
path: root/Src/subst.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:20:19 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:20:19 +0000
commit04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8 (patch)
tree2215f99f95d55660fc939a029bf965c454d080b5 /Src/subst.c
parent7a0415cfd70a02b2280d27556c6c54cef1c86e1a (diff)
downloadzsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.tar.gz
zsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.tar.xz
zsh-04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8.zip
zsh-3.1.5-pws-12 zsh-3.1.5-pws-12
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 6445776d1..42e8e36d4 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -263,7 +263,7 @@ multsub(char **s, char ***a, int *isarr, char *sep)
 	    *isarr = 0;
 	return 0;
     }
-    if ((l = countlinknodes(foo)) > 1) {
+    if ((l = countlinknodes(foo)) > 1 || a) {
 	p = r = ncalloc((l + 1) * sizeof(char*));
 	while (nonempty(foo))
 	    *p++ = (char *)ugetnode(foo);
@@ -976,7 +976,9 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
 	skipparens(*s, *s == Inpar ? Outpar : Outbrace, &s);
 	sav = *s;
 	*s = 0;
-	if (multsub(&val, (aspar ? NULL : &aval), &isarr, NULL) && quoted) {
+	if (multsub(&val, (((quoted || aspar) && !nojoin) ? NULL : &aval),
+		    &isarr, NULL) &&
+	    quoted) {
 	    isarr = -1;
 	    aval = alloc(sizeof(char *));
 	    aspar = 0;