From 043959b0be340e0918b33a47859249b04abe7b21 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 27 Sep 2008 20:58:24 +0000 Subject: 25760: add (~) flag --- Doc/Zsh/expn.yo | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Doc') 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. -- cgit 1.4.1