diff options
author | Peter Stephenson <pws@zsh.org> | 2015-05-21 10:43:32 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2015-05-21 10:43:32 +0100 |
commit | a95f2c607113b3edd411499ff25ce79fba8a79de (patch) | |
tree | f41ce77092cbd22f2cfc560ad6e63990b6629e64 /Doc/Zsh | |
parent | afb78f5d142786169817709e6ec4c48637bcae93 (diff) | |
download | zsh-a95f2c607113b3edd411499ff25ce79fba8a79de.tar.gz zsh-a95f2c607113b3edd411499ff25ce79fba8a79de.tar.xz zsh-a95f2c607113b3edd411499ff25ce79fba8a79de.zip |
35250: Fix case documentation (SH_GLOB)
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/grammar.yo | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo index a3f492769..4476fc392 100644 --- a/Doc/Zsh/grammar.yo +++ b/Doc/Zsh/grammar.yo @@ -239,11 +239,17 @@ item(tt(case) var(word) tt(in) [ [tt(LPAR())] var(pattern) [ tt(|) var(pattern) Execute the var(list) associated with the first var(pattern) that matches var(word), if any. The form of the patterns is the same as that used for filename generation. See -noderef(Filename Generation). Note further that the whole -pattern with alternatives is treated by the shell as equivalent -to a group of patterns within parentheses, even though in -the tt(case) syntax whitespace may appear about the parentheses and the -vertical bar. +noderef(Filename Generation). + +Note further that, unless the tt(SH_GLOB) option is set, the whole +pattern with alternatives is treated by the shell as equivalent to a +group of patterns within parentheses, although white space may appear +about the parentheses and the vertical bar and will be stripped from the +pattern at those points. White space may appear elsewhere in the +pattern; this is not stripped. If the tt(SH_GLOB) option is set, so +that an opening parenthesis can be unambiguously treated as part of the +case syntax, the expression is parsed into separate words and these are +treated as strict alternatives (as in other shells). If the var(list) that is executed is terminated with tt(;&) rather than tt(;;), the following list is also executed. The rule for |