zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: PATCH: quote parameter expansion from GLOB_SUBST
Date: Sun, 10 May 2015 19:59:35 +0100	[thread overview]
Message-ID: <20150510195935.0f10c8b9@ntlworld.com> (raw)
In-Reply-To: <20150510160759.GC1971@tarsus.local2>

On Sun, 10 May 2015 16:07:59 +0000
Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> So, overall:

Thanks, I've used that.

I missed out backslashing backslash.  You sometimes get away with this;
the amended test shows a case where you don't.

pws

diff --git a/Src/zsh.h b/Src/zsh.h
index b2ab1df..f6e08e2 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -217,7 +217,7 @@ struct mathfunc {
 
 /* chars that need to be quoted for pattern matching */
 
-#define PATCHARS "#^*()|[]<>?~"
+#define PATCHARS "#^*()|[]<>?~\\"
 
 /*
  * Types of quote.  This is used in various places, so care needs
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 17a59cb..d96ffb6 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -1700,6 +1700,6 @@
 >
 >Four
 
-  funnychars='The qu*nk br!wan f@x j/mps o[]r the la~# ^"&;'
+  funnychars='The qu*nk br!wan f@x j/mps o[]r \(e la~# ^"&;'
   [[ $funnychars = ${~${(b)funnychars}} ]]
 0:${(b)...} quoting protects from GLOB_SUBST


  reply	other threads:[~2015-05-10 18:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-09 23:44 Peter Stephenson
2015-05-10 16:07 ` Daniel Shahaf
2015-05-10 18:59   ` Peter Stephenson [this message]
2015-05-12  5:16 ` Jun T.
2015-05-12  7:04   ` Jun T.
2015-05-14 21:50 ` Oliver Kiddle
2015-05-15  8:46   ` Peter Stephenson
2015-05-15  8:54     ` 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=20150510195935.0f10c8b9@ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).