diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2019-12-31 18:35:06 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2019-12-31 18:35:06 +0000 |
commit | c557cee1a65f5668846818aedb03d4d0bee60c02 (patch) | |
tree | 6ed3ca45360173930195a4e4a15ab5dea5356453 /Src/Zle/zle_tricky.c | |
parent | f3d18c3fb5ef431962a3ed2062f637e253b3d975 (diff) | |
download | zsh-c557cee1a65f5668846818aedb03d4d0bee60c02.tar.gz zsh-c557cee1a65f5668846818aedb03d4d0bee60c02.tar.xz zsh-c557cee1a65f5668846818aedb03d4d0bee60c02.zip |
24581: Fix array assignments in shell word splitting and completion.
Assignments after the first were not recognised as such as without the full parser the state didn't return to command position. Fix this in bufferwords() and the completion miniparser.
Diffstat (limited to 'Src/Zle/zle_tricky.c')
-rw-r--r-- | Src/Zle/zle_tricky.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 2b25d6b2e..fdd168763 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1236,8 +1236,10 @@ get_comp_string(void) else if (tok == OUTPAR) { if (parct) parct--; - else + else if (linarr) { linarr = 0; + incmdpos = 1; + } } if (inredir && IS_REDIROP(tok)) { rdstr = rdstrbuf; |