summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmc <jmc@openbsd.org>2015-03-15 11:15:55 +0000
committerjmc <jmc@openbsd.org>2015-03-15 11:15:55 +0000
commit881b132d6d1cb3022be49defd1d606291002280c (patch)
treede6307ca6cc6dbce171f9323e065bb18968c4ddc
parentfix for regression test for strtol(). it failed (the wrong kind of (diff)
downloadwireguard-openbsd-881b132d6d1cb3022be49defd1d606291002280c.tar.xz
wireguard-openbsd-881b132d6d1cb3022be49defd1d606291002280c.zip
from zhuk: the dash part of "cd -" is not a flag, so don;t show it as such;
posix actually uses a separate synopsis to show this form, but i've chosen to show it as a special form of "dir";
-rw-r--r--bin/ksh/sh.115
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/ksh/sh.1 b/bin/ksh/sh.1
index c90dd63d8db..310a2377755 100644
--- a/bin/ksh/sh.1
+++ b/bin/ksh/sh.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sh.1,v 1.102 2015/03/14 18:54:50 jmc Exp $
+.\" $OpenBSD: sh.1,v 1.103 2015/03/15 11:15:55 jmc Exp $
.\"
.\" Copyright (c) 2015 Jason McIntyre <jmc@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: March 14 2015 $
+.Dd $Mdocdate: March 15 2015 $
.Dt SH 1
.Os
.Sh NAME
@@ -268,7 +268,7 @@ or
loop,
or from loop level
.Ar n .
-.It Ic cd Oo Fl | L | P Oc Op Ar dir
+.It Ic cd Oo Fl L | P Oc Op Ar dir
Change the current working directory to
.Ar dir ,
or
@@ -276,6 +276,12 @@ or
by default.
If
.Ar dir
+is set to
+.Sq - ,
+change to the previous working directory and
+print the (now current) working directory.
+If
+.Ar dir
does not begin with a slash or dot,
.Ev CDPATH
is searched for the directory.
@@ -293,9 +299,6 @@ components.
Resolve symbolic links before processing
.Qq ..
components.
-.It Fl
-Change to the previous working directory and
-print the (now current) working directory.
.El
.It Ic command Oo Fl p | V | v Oc Ar command Op Ar arg ...
Invoke