summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2014-11-19 15:48:58 +0000
committerPeter Stephenson <pws@zsh.org>2014-11-19 15:48:58 +0000
commitdded99b0852f5c6847fa48cdd6ee6b74c8a8bc57 (patch)
treeff125992b9625de6780242d9c6307062befba94f
parent0a4223d908da1026ccddbf946fe9a2a62eab7a94 (diff)
downloadzsh-dded99b0852f5c6847fa48cdd6ee6b74c8a8bc57.tar.gz
zsh-dded99b0852f5c6847fa48cdd6ee6b74c8a8bc57.zip
33679: Note on patter s in case statements
They work exactly like groups in other patterns, despite contrary indications.
-rw-r--r--ChangeLog8
-rw-r--r--Doc/Zsh/grammar.yo6
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fd41e4a9..62eb2df1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,13 @@
+2014-11-19 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 33679: Doc/Zsh/grammar.yo: Note that alternation in case
+ patterns works just like filename generation, despite
+ appearances to the contrary.
+
2014-11-17 Oliver Kiddle <opk@zsh.org>
* 33704: Doc/Zsh/zle.yo, Src/Zle/zle_bindings.c,
- Src/Zle/zle_keymap.c, Src/Zle/zle_refresh.c, Src/Zle/zle_vi.c,
+ Src/Zle/zle_keX4aymap.c, Src/Zle/zle_refresh.c, Src/Zle/zle_vi.c,
Test/X02zlevi.ztst, Test/comptest: key bindings, documentation,
tests and minor fixes for vim style visual selection changes
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index 4d04c2470..63d90dfd0 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -239,7 +239,11 @@ 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).
+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.
If the var(list) that is executed is terminated with tt(;&) rather than
tt(;;), the following list is also executed. The rule for