Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: quote parameter expansion from GLOB_SUBST



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