diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2015-03-15 11:15:56 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2015-03-15 11:15:56 +0000 |
commit | 841ac46e688ad2cf5ddd455d1c351d3552f995d0 (patch) | |
tree | fec5a33c283821cda4f384147a4d0c1fd8d7e3a8 | |
parent | ec562c3b775f224182638fde2bf2902d0dbf586b (diff) |
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.1 | 15 |
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 |