Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: quote parameter expansion from GLOB_SUBST
- X-seq: zsh-workers 35078
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: quote parameter expansion from GLOB_SUBST
- Date: Sun, 10 May 2015 19:59:35 +0100
- In-reply-to: <20150510160759.GC1971@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150510004444.0f7d5444@ntlworld.com> <20150510160759.GC1971@tarsus.local2>
On Sun, 10 May 2015 16:07:59 +0000
Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author