summaryrefslogtreecommitdiff
path: root/bin/ksh/ksh.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-12-16 13:08:36 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-12-16 13:08:36 +0000
commit6f7f17f793e3f999dab1535ebd387bdb7a9a38e4 (patch)
tree29fe2442a0e78156aafed4a64e7dc85d832fcf89 /bin/ksh/ksh.1
parent8fe0f5c7714d89cb93df8184c9483e2887975abe (diff)
Tweak the syntax displays to show that the list of words
in "for name in [word ...]; do list; done" can be empty. In sh(1), clarify what happens in that case. In ksh(1), clarify how it can happen that the list is never executed. OK jmc@ tb@
Diffstat (limited to 'bin/ksh/ksh.1')
-rw-r--r--bin/ksh/ksh.112
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1
index 5dcefe1d456..3db9a930947 100644
--- a/bin/ksh/ksh.1
+++ b/bin/ksh/ksh.1
@@ -1,8 +1,8 @@
-.\" $OpenBSD: ksh.1,v 1.201 2018/06/18 17:03:58 millert Exp $
+.\" $OpenBSD: ksh.1,v 1.202 2018/12/16 13:08:35 schwarze Exp $
.\"
.\" Public Domain
.\"
-.Dd $Mdocdate: June 18 2018 $
+.Dd $Mdocdate: December 16 2018 $
.Dt KSH 1
.Os
.Sh NAME
@@ -540,7 +540,7 @@ if no
.Ar list
is executed, the exit status is zero.
.It Xo Ic for Ar name
-.Oo Cm in Ar word No ... Oc ;
+.Op Cm in Op Ar word ... ;
.Cm do Ar list ; Cm done
.Xc
For each
@@ -564,10 +564,10 @@ e.g.\&
The exit status of a
.Ic for
statement is the last exit status of
-.Ar list ;
-if
+.Ar list .
+If there are no items,
.Ar list
-is never executed, the exit status is zero.
+is not executed and the exit status is zero.
.It Xo Ic if Ar list ;
.Cm then Ar list ;
.Oo Cm elif Ar list ;