about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/expn.yo12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 6bb0b4ada..afd6b1ff9 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -1023,15 +1023,15 @@ Quoting using one of the tt(q) family of flags does not work
 for this purpose since quotes are not stripped from non-pattern
 characters by tt(GLOB_SUBST).  In other words,
 
-example(foo='a\ b'
-[[ 'a b' = ${~foo} ]])
+example(pattern=${(q)str}
+[[ $str = ${~pattern} ]])
 
-fails, whereas
+works if tt($str) is tt('a*b') but not if it is tt('a b'), whereas
 
-example(foo='a\*b'
-[[ 'a*b' = ${~foo} ]])
+example(pattern=${(b)str}
+[[ $str = ${~pattern} ]])
 
-succeeds.  The tt(b) flag ensures the correct quoting.
+is always true for any possible value of tt($str).
 )
 item(tt(Q))(
 Remove one level of quotes from the resulting words.