about summary refs log tree commit diff
path: root/Doc/Zsh/expn.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-09-27 20:58:24 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-09-27 20:58:24 +0000
commit043959b0be340e0918b33a47859249b04abe7b21 (patch)
treee8d35801c8eb0f2c82b29f27798a718d1895092e /Doc/Zsh/expn.yo
parent4a34c9628942a3631500e51b57ce4ccb4ac77fb4 (diff)
downloadzsh-043959b0be340e0918b33a47859249b04abe7b21.tar.gz
zsh-043959b0be340e0918b33a47859249b04abe7b21.tar.xz
zsh-043959b0be340e0918b33a47859249b04abe7b21.zip
25760: add (~) flag
Diffstat (limited to 'Doc/Zsh/expn.yo')
-rw-r--r--Doc/Zsh/expn.yo14
1 files changed, 13 insertions, 1 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index b16ec4b5b..e2434431a 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -910,7 +910,19 @@ argument, a matched pair of delimiters must surround each argument.
 startitem()
 item(tt(p))(
 Recognize the same escape sequences as the tt(print) builtin
-in string arguments to any of the flags described below.
+in string arguments to any of the flags described below that
+follow this argument.
+)
+item(tt(~))(
+Force string arguments to any of the flags below that follow within
+the parentheses to be treated as patterns.  Compare with a tt(~)
+outside parentheses, which forces the entire substituted string to
+be treated as a pattern.  Hence, for example,
+example([[ "?" = ${(~j.|.)array} ]])
+with the tt(EXTENDED_GLOB) option set succeeds if and only if tt($array)
+contains the string `tt(?)' as an element.  The argument may be
+repeated to toggle the behaviour; its effect only lasts to the
+end of the parenthesised group.
 )
 item(tt(j:)var(string)tt(:))(
 Join the words of arrays together using var(string) as a separator.