diff options
author | Bart Schaefer <schaefer@zsh.org> | 2024-08-15 18:06:19 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@zsh.org> | 2024-08-15 18:06:19 -0700 |
commit | 5977d3cdd4b241ab7afff868ed58afc00b45c424 (patch) | |
tree | 73507fbd28ac1bdf8383e502954e9380f454e55f | |
parent | 8a811b369b8c7338a90bb85e12bc9f0cfb2b6b6d (diff) | |
download | zsh-5977d3cdd4b241ab7afff868ed58afc00b45c424.tar.gz zsh-5977d3cdd4b241ab7afff868ed58afc00b45c424.zip |
unposted: fix parsing of Bang token in value side of array element assignment
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/lex.c | 3 | ||||
-rw-r--r-- | Test/A06assign.ztst | 7 |
3 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2024-08-15 Bart Schaefer <schaefer@zsh.org> + + * unposted (see 53034): Src/lex.c, Test/A06assign.ztst: fix parsing + of Bang token in value side of array element assignment + 2024-08-13 Eric Cook <llua@gmx.com> * 53031: Christian Heusel: Completion/Unix/Command/_git: add @@ -1402,10 +1402,11 @@ gettokstr(int c, int sub) /* * Same logic as Dash, for ! to perform negation in range. */ - if (seen_brct) + if (seen_brct && brct) c = Bang; else c = '!'; + break; case LX2_OTHER: if (in_brace_param) { if (c == '/') { diff --git a/Test/A06assign.ztst b/Test/A06assign.ztst index 3eff5331a..9f779b9a8 100644 --- a/Test/A06assign.ztst +++ b/Test/A06assign.ztst @@ -743,3 +743,10 @@ print $a 0:overwrite [2] character (string: "") with "xx" >xx + + ( sleep 1 & + x[1]=$! + typeset -p x + ) +0:regression workers/53033: assigning $! to array element +*>typeset -g -a x=\( <-> \) |