From 83a7565d3c3a74cc2df831e86f9fd3f979a3f7aa Mon Sep 17 00:00:00 2001 From: Philipp Weis Date: Sun, 28 Nov 2010 19:40:17 +0800 Subject: [MAN] Document optional open parenthesis for case patterns While inspecting some dash scripts on my system, I was surprised to see that some of them use an open parenthesis at the beginning of case patterns while that's not mentioned in the manpage. Dash currently is fine with and without that parenthesis (parser.c:413). The attached patch documents this feature. Signed-off-by: Herbert Xu --- ChangeLog | 4 ++++ src/dash.1 | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f148ef6..76cbeb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-11-28 Philipp Weis + + * Document optional open parenthesis for case patterns. + 2010-11-28 Herbert Xu * Fixed trap/return regression due to SKIPEVAL removal. diff --git a/src/dash.1 b/src/dash.1 index c7771d0..ddeb52b 100644 --- a/src/dash.1 +++ b/src/dash.1 @@ -663,7 +663,7 @@ These are implemented as builtin commands. The syntax of the case command is .Bd -literal -offset indent case word in -pattern) list ;; +[(]pattern) list ;; \&... esac .Ed @@ -673,6 +673,11 @@ The pattern can actually be one or more patterns (see described later), separated by .Dq \*(Ba characters. +The +.Do +( +.Dc +character before the pattern is optional. .Ss Grouping Commands Together Commands may be grouped by writing either .Pp -- cgit 1.4.1