summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-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.