zsh-users
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-users@zsh.org
Subject: Re: ${(z)} parsing of multiple array assignments
Date: Mon, 30 Dec 2019 18:21:35 +0000	[thread overview]
Message-ID: <20191230182135.abx2lfvbtgsraalh@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20191230181339.hg7ryxivv75ae73r@tarpaulin.shahaf.local2>

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

  reply	other threads:[~2019-12-30 18:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23 17:31 Daniel Shahaf
2019-12-24 20:34 ` Phil Pennock
2019-12-24 23:16   ` Sebastian Gniazdowski
2019-12-29 20:55 ` Peter Stephenson
2019-12-29 23:45   ` Peter Stephenson
2019-12-30 18:13     ` Daniel Shahaf
2019-12-30 18:21       ` Daniel Shahaf [this message]
2019-12-30 22:37         ` Peter Stephenson
2019-12-30 23:46           ` Daniel Shahaf
2019-12-31 11:58             ` Daniel Shahaf
2019-12-31 18:35             ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191230182135.abx2lfvbtgsraalh@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).