zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-workers@zsh.org>
Subject: Re: A strange quoted nested evaluation issue
Date: Tue, 20 Nov 2018 14:26:22 +0000	[thread overview]
Message-ID: <1542723982.4131.7.camel@samsung.com> (raw)
In-Reply-To: <1FB702EA-35DA-4155-B8A1-0402B90E79D3@dana.is>

On Mon, 2018-11-19 at 12:39 -0600, dana wrote:
> On 19 Nov 2018, at 02:04, Ian F <in4mer@gmail.com> wrote:
> > 
> > Normally I wouldn't mail the list about this kind of thing, but this one's
> > just too weird.  Thoughts?
> It's counting a Nularg (0xa1). And it's not just a problem there; try e.g.
> "${(g<>)${baz}}" or "${(l<3><x>)${baz}}". Not sure where the best place to fix
> it is though

Right.

This, I think.

pws

diff --git a/Src/subst.c b/Src/subst.c
index c706b96..ff6750a 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2405,6 +2405,8 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
 	    aspar = 0;
 	} else if (aspar)
 	    idbeg = val;
+	if (*val == Nularg)
+	    ++val;
 	*s = sav;
 	/*
 	 * This tests for the second double quote in an expression


      reply	other threads:[~2018-11-20 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19  8:04 Ian F
2018-11-19 18:39 ` dana
2018-11-20 14:26   ` Peter Stephenson [this message]

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=1542723982.4131.7.camel@samsung.com \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@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).