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 | |
parent | d9b00a38701ff795a382020291dfed6c32b6d40e (diff) | |
download | zsh-af2ae90d25c362365f8fd82c15e57d22b692cddf.tar.gz zsh-af2ae90d25c362365f8fd82c15e57d22b692cddf.tar.xz zsh-af2ae90d25c362365f8fd82c15e57d22b692cddf.zip |
Fix "${=foo=$@}".
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/subst.c | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 65348f35c..fc64a84d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,13 @@ +2001-02-16 Bart Schaefer <schaefer@zsh.org> + + * 13495: Follow-up to 13492 to un-break "${(A)=foo=$@}". + 2001-02-16 Sven Wischnowsky <wischnow@zsh.org> * 13494: Completion/Core/compinit: make `compdef foo=bar' use the service defined for `bar' if there is any -2001-02-16 Bart Schaefer <schaefer@brasslantern.com> +2001-02-16 Bart Schaefer <schaefer@zsh.org> * 13492: Src/subst.c: Partial fix for ${1+"$@"} expanding to an array (still doesn't handle shwordsplit properly); fix so 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; |