From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 3bff03d1 for ; Mon, 30 Dec 2019 18:22:17 +0000 (UTC) Received: (qmail 19240 invoked by alias); 30 Dec 2019 18:22:11 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24583 Received: (qmail 4374 invoked by uid 1010); 30 Dec 2019 18:22:11 -0000 X-Qmail-Scanner-Diagnostics: from wout5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25677. spamassassin: 3.4.2. Clear:RC:0(64.147.123.21):SA:0(-2.6/5.0):. Processed in 0.714816 secs); 30 Dec 2019 18:22:11 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdefhedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjfgesth dttddttdervdenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcuoegurdhssegurghn ihgvlhdrshhhrghhrghfrdhnrghmvgeqnecukfhppeejledrudektddrheejrdduudelne curfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhn rghmvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Date: Mon, 30 Dec 2019 18:21:35 +0000 From: Daniel Shahaf To: zsh-users@zsh.org Subject: Re: ${(z)} parsing of multiple array assignments Message-ID: <20191230182135.abx2lfvbtgsraalh@tarpaulin.shahaf.local2> References: <20191223173115.bvhwbpfmqgqhngle@tarpaulin.shahaf.local2> <7b7a941ddc3c20bea6a6b69b1e7ac35d827f320d.camel@ntlworld.com> <373ee4b006198f68c835c902c0bc35242796b33d.camel@ntlworld.com> <20191230181339.hg7ryxivv75ae73r@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191230181339.hg7ryxivv75ae73r@tarpaulin.shahaf.local2> User-Agent: NeoMutt/20170113 (1.7.2) 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