diff options
author | Jun T <takimoto-j@kba.biglobe.ne.jp> | 2015-05-12 14:51:43 +0900 |
---|---|---|
committer | Jun T <takimoto-j@kba.biglobe.ne.jp> | 2015-05-12 14:51:43 +0900 |
commit | 8421c9e59dfc9a3abc71a060f8577c342f81a007 (patch) | |
tree | 6ba962e219000576b0effff21016ceede6d01ff6 /Doc/Zsh | |
parent | b884853756f0bd3489f2bad9e464498c798c672c (diff) | |
download | zsh-8421c9e59dfc9a3abc71a060f8577c342f81a007.tar.gz zsh-8421c9e59dfc9a3abc71a060f8577c342f81a007.tar.xz zsh-8421c9e59dfc9a3abc71a060f8577c342f81a007.zip |
35086: reapply a hunk from 35067 for expn.yo
the hunk has been mistakenly reverted by 35075
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/expn.yo | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo index 1089ddf40..6bb0b4ada 100644 --- a/Doc/Zsh/expn.yo +++ b/Doc/Zsh/expn.yo @@ -1014,6 +1014,25 @@ 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(foo='a\ b' +[[ 'a b' = ${~foo} ]]) + +fails, whereas + +example(foo='a\*b' +[[ 'a*b' = ${~foo} ]]) + +succeeds. The tt(b) flag ensures the correct quoting. +) item(tt(Q))( Remove one level of quotes from the resulting words. ) |