diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-05-10 19:19:34 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-05-10 19:19:34 +0100 |
commit | 6269db883ad6989a578bac299deab9c4285bb1df (patch) | |
tree | 29639c2221b8b15fc2e9d36ee9f5e03b529dc038 /Src/zsh.h | |
parent | bb2362e2c049602b79116aa9570a72dd89711349 (diff) | |
download | zsh-6269db883ad6989a578bac299deab9c4285bb1df.tar.gz zsh-6269db883ad6989a578bac299deab9c4285bb1df.tar.xz zsh-6269db883ad6989a578bac299deab9c4285bb1df.zip |
35067: Add (b) parameter flag for pattern char backslashing.
Doc tweak from Daniel in 35071. Includes test.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r-- | Src/zsh.h | 10 |
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 |