From c557cee1a65f5668846818aedb03d4d0bee60c02 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 31 Dec 2019 18:35:06 +0000 Subject: 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. --- Src/Zle/zle_tricky.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src/Zle/zle_tricky.c') 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; -- cgit 1.4.1