zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Martijn Dekker <martijn@inlv.org>,
	Peter Stephenson <p.stephenson@samsung.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [^ax-y] doesn't work but [^x-ya] does
Date: Wed, 8 Mar 2017 21:18:22 -0800	[thread overview]
Message-ID: <170308211822.ZM27099@torch.brasslantern.com> (raw)
In-Reply-To: <bc830541-a365-1a96-dee1-0cef364b4899@inlv.org>

On Mar 8,  7:12pm, Martijn Dekker wrote:
}
} Commit f3f8537c breaks unquoted $-:

We get here:

#0  fetchvalue (v=0xbff07f00, pptr=0xbff07f64, bracks=1, flags=0)
    at ../../zsh-5.0/Src/params.c:1969
#1  0x080de7db in paramsubst (l=0xb7d68778, n=0xb7d68790, str=0xbff07fd8, 
    qt=0, pf_flags=0, ret_flags=0xbff0813c) at ../../zsh-5.0/Src/subst.c:2418
#2  0x080dacff in stringsubst (list=0xb7d68778, node=0xb7d68790, pf_flags=0, 
    ret_flags=0xbff0813c, asssub=0) at ../../zsh-5.0/Src/subst.c:247
#3  0x080da47d in prefork (list=0xb7d68778, flags=0, ret_flags=0xbff0813c)
    at ../../zsh-5.0/Src/subst.c:85

With pptr still pointing at "\233" (Dash).  Hopefully the following
doesn't re-break anything else.

diff --git a/Src/params.c b/Src/params.c
index b89fb74..bee01c5 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -1987,7 +1987,9 @@ fetchvalue(Value v, char **pptr, int bracks, int flags)
 	*s++ = '$';
     else if (c == Star)
 	*s++ = '*';
-    else if (c == '#' || c == '-' || c == '?' || c == '$' ||
+    else if (IS_DASH(c))
+    	*s++ = '-';
+    else if (c == '#' || c == '?' || c == '$' ||
 	     c == '!' || c == '@' || c == '*')
 	s++;
     else


  reply	other threads:[~2017-03-09  5:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170302073436epcas2p1ee2d6d723bc7b0865e11243777a08417@epcas2p1.samsung.com>
2017-03-02  7:33 ` Sebastian Gniazdowski
2017-03-02  8:36   ` Sebastian Gniazdowski
2017-03-02 10:47   ` Peter Stephenson
2017-03-02 11:22     ` Sebastian Gniazdowski
2017-03-02 11:53       ` Peter Stephenson
2017-03-04 23:21         ` Bart Schaefer
2017-03-06 11:28           ` Peter Stephenson
2017-03-07 10:51             ` Peter Stephenson
2017-03-08 19:12               ` Martijn Dekker
2017-03-09  5:18                 ` Bart Schaefer [this message]
2017-03-09 10:29                   ` Peter Stephenson
2017-02-24 20:38 Sebastian Gniazdowski
2017-02-25  7:32 ` Bart Schaefer
2017-02-25  8:21   ` Sebastian Gniazdowski

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=170308211822.ZM27099@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=martijn@inlv.org \
    --cc=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).