summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-07-06 16:27:07 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-07-06 16:35:25 -0700
commitf56e23eb66ccaa6dec664eafe32f8fd66c2de090 (patch)
tree51f9504a7ff2b49232394348719b80035ef1dfcc
parentef3db713d5d3668e8f99e3262d2470e7058829d4 (diff)
downloadzsh-f56e23eb66ccaa6dec664eafe32f8fd66c2de090.tar.gz
zsh-f56e23eb66ccaa6dec664eafe32f8fd66c2de090.tar.xz
zsh-f56e23eb66ccaa6dec664eafe32f8fd66c2de090.zip
unposted: alphabetize ${(b)...} flag
-rw-r--r--Doc/Zsh/expn.yo38
1 files changed, 19 insertions, 19 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 1e1fc522f..4d54c42f8 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -930,6 +930,25 @@ array index order.  Note that `tt(a)' is therefore equivalent to the
 default but `tt(Oa)' is useful for obtaining an array's elements in reverse
 order.
 )
+item(tt(b))(
+Quote with backslashes only characters that are special to pattern
+matching. This is useful when the contents of the variable are to be
+tested using tt(GLOB_SUBST), including the tt(${~)var(...)tt(}) switch.
+
+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(pattern=${(q)str}
+[[ $str = ${~pattern} ]])
+
+works if tt($str) is tt('a*b') but not if it is tt('a b'), whereas
+
+example(pattern=${(b)str}
+[[ $str = ${~pattern} ]])
+
+is always true for any possible value of tt($str).
+)
 item(tt(c))(
 With tt(${#)var(name)tt(}), count the total number of characters in an array,
 as if the elements were concatenated with spaces between them.  This is not
@@ -1034,25 +1053,6 @@ form of single quoting is used that only quotes the string if needed to
 protect special characters.  Typically this form gives the most readable
 output.
 )
-item(tt(b))(
-Quote with backslashes only characters that are special to pattern
-matching. This is useful when the contents of the variable are to be
-tested using tt(GLOB_SUBST), including the tt(${~)var(...)tt(}) switch.
-
-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(pattern=${(q)str}
-[[ $str = ${~pattern} ]])
-
-works if tt($str) is tt('a*b') but not if it is tt('a b'), whereas
-
-example(pattern=${(b)str}
-[[ $str = ${~pattern} ]])
-
-is always true for any possible value of tt($str).
-)
 item(tt(Q))(
 Remove one level of quotes from the resulting words.
 )