diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2001-02-16 17:16:13 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2001-02-16 17:16:13 +0000 |
commit | af2ae90d25c362365f8fd82c15e57d22b692cddf (patch) | |
tree | 9d3c1f60378d31089d843bf96ca8fa2dba395ea1 /Src/subst.c | |
parent | d9b00a38701ff795a382020291dfed6c32b6d40e (diff) | |
download | zsh-af2ae90d25c362365f8fd82c15e57d22b692cddf.tar.gz zsh-af2ae90d25c362365f8fd82c15e57d22b692cddf.tar.xz zsh-af2ae90d25c362365f8fd82c15e57d22b692cddf.zip |
Fix "${=foo=$@}".
Diffstat (limited to 'Src/subst.c')
-rw-r--r-- | Src/subst.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/subst.c b/Src/subst.c index da848779a..27ed6af07 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -1015,7 +1015,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub) spbreak = 0; s++; } else - spbreak = 1; + spbreak = 2; } else if ((c == '#' || c == Pound) && (iident(cc = s[1]) || cc == '*' || cc == Star || cc == '@' @@ -1414,8 +1414,6 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub) if (spsep || spbreak) { aval = sepsplit(val, spsep, 0, 1); isarr = 2; - sep = spsep = NULL; - spbreak = 0; l = arrlen(aval); if (l && !*(aval[l-1])) l--; @@ -1456,10 +1454,12 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub) if (isarr) { if (nojoin) isarr = -1; - if (qt && !getlen && isarr > 0) { + if (qt && !getlen && isarr > 0 && !spsep && spbreak < 2) { val = sepjoin(aval, sep, 1); isarr = 0; } + sep = spsep = NULL; + spbreak = 0; } } break; |