summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-05-11 09:40:00 +0100
committerPeter Stephenson <pws@zsh.org>2015-05-11 09:40:00 +0100
commitd756f4eafd5d9f5fb3125d88d6a8b703b3ab6078 (patch)
treeb957d9e914d226ea5222ea4d8dac95d404f8849a
parent6269db883ad6989a578bac299deab9c4285bb1df (diff)
downloadzsh-d756f4eafd5d9f5fb3125d88d6a8b703b3ab6078.tar.gz
zsh-d756f4eafd5d9f5fb3125d88d6a8b703b3ab6078.zip
35078: Add backslash quoting to parameter (b) flag from 35067.
-rw-r--r--ChangeLog5
-rw-r--r--Src/zsh.h2
-rw-r--r--Test/D04parameter.ztst2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5563797ba..9cfa8e943 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-11 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 35078: Src/zsh.h, Test/D04parameter.ztst: also quote backslash
+ with (b) flag.
+
2015-05-10 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 35067 (doc tweak from Daniel, 35071): Doc/Zsh/expn.yo,
diff --git a/Src/zsh.h b/Src/zsh.h
index b2ab1dfae..f6e08e28d 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 17a59cb2c..d96ffb64f 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