summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index bb52e106d..b2ab1dfae 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -215,6 +215,10 @@ struct mathfunc {
 
 #define SPECCHARS "#$^*()=|{}[]`<>?~;&\n\t \\\'\""
 
+/* chars that need to be quoted for pattern matching */
+
+#define PATCHARS "#^*()|[]<>?~"
+
 /*
  * Types of quote.  This is used in various places, so care needs
  * to be taken when changing them.  (Oooh, don't you look surprised.)
@@ -249,6 +253,12 @@ enum {
      */
     QT_SINGLE_OPTIONAL,
     /*
+     * Only quote pattern characters.
+     * ${(b)foo} guarantees that ${~foo} matches the string
+     * contained in foo.
+     */
+    QT_BACKSLASH_PATTERN,
+    /*
      * As QT_BACKSLASH, but a NULL string is shown as ''.
      */
     QT_BACKSLASH_SHOWNULL