diff options
author | jilles <jilles@FreeBSD.org> | 2011-06-17 13:03:49 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-06-17 13:03:49 +0000 |
commit | c7a72567a8474dcecd93215073976b04171d1144 (patch) | |
tree | d74a77976194c0d5d68bbf18c002a166b97300a5 /bin/sh/sh.1 | |
parent | f405f6d6f8e62f9714eb668d35001c794646022b (diff) | |
download | FreeBSD-src-c7a72567a8474dcecd93215073976b04171d1144.zip FreeBSD-src-c7a72567a8474dcecd93215073976b04171d1144.tar.gz |
sh: Add case statement fallthrough (with ';&' instead of ';;').
Replacing ;; with the new control operator ;& will cause the next list to be
executed as well without checking its pattern, continuing until a list ends
with ;; or until the end of the case statement. This is like omitting
"break" in a C "switch" statement.
The sequence ;& was formerly invalid.
This feature is proposed for the next POSIX issue in Austin Group issue
#449.
Diffstat (limited to 'bin/sh/sh.1')
-rw-r--r-- | bin/sh/sh.1 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 67ffcc6..82a71e9 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 15, 2011 +.Dd June 17, 2011 .Dt SH 1 .Os .Sh NAME @@ -372,7 +372,7 @@ The following is a list of valid operators: .It Control operators: .Bl -column "XXX" "XXX" "XXX" "XXX" "XXX" -offset center -compact .It Li & Ta Li && Ta Li ( Ta Li ) Ta Li \en -.It Li ;; Ta Li ; Ta Li | Ta Li || +.It Li ;; Ta Li ;& Ta Li ; Ta Li | Ta Li || .El .It Redirection operators: .Bl -column "XXX" "XXX" "XXX" "XXX" "XXX" -offset center -compact @@ -990,6 +990,11 @@ described later), separated by .Ql \&| characters. +If the selected list is terminated by the control operator +.Ql ;& +instead of +.Ql ;; , +execution continues with the next list. The exit code of the .Ic case command is the exit code of the last command executed in the list or |