Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ${(z)} parsing of multiple array assignments
Daniel Shahaf wrote on Mon, Dec 30, 2019 at 18:13:39 +0000:
> Peter Stephenson wrote on Sun, Dec 29, 2019 at 23:45:00 +0000:
> > On Sun, 2019-12-29 at 20:55 +0000, Peter Stephenson wrote:
> > > Unless I'm missing some trick, bufferwords() is the function where we
> > > need to update any parser state --- ctxtlex() is too low level for that,
> > > it just handles the next token given the current state. So it's
> > > probably something like this. Will need a new test adding.
> >
> > We also need to do something similar for completion, otherwise
> >
> > foo=(stuff) bar=(...
> >
> > looks like a glob qualifier.
> >
> > In this case it's already half handled, so there's a variable to hook
> > into.
>
> Thanks for the fix; it didn't occur to me to change bufferwords().
>
> Here's a test.
One more:
diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst
index 7ef319f7b..51f604bcf 100644
--- a/Test/Y01completion.ztst
+++ b/Test/Y01completion.ztst
@@ -216,6 +216,15 @@ F:regression test workers/31611
>NO:{3pm}
>NO:{10pm}
+ comptest $'a=() b=(\t'
+0:multiple envarrays
+>line: {a=() b=(}{}
+>DESCRIPTION:{file}
+>DI:{dir1}
+>DI:{dir2}
+>FI:{file1}
+>FI:{file2}
+
%clean
zmodload -ui zsh/zpty
Messages sorted by:
Reverse Date,
Date,
Thread,
Author