Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man1 Move the text that explains that cd(1) is a s...



details:   https://anonhg.NetBSD.org/src/rev/62503fcb718d
branches:  trunk
changeset: 453909:62503fcb718d
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sat Aug 31 21:35:50 2019 +0000

description:
Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.
Improve formatting.

diffstat:

 share/man/man1/cd.1 |  46 +++++++++++++++++++++++++++++++---------------
 1 files changed, 31 insertions(+), 15 deletions(-)

diffs (78 lines):

diff -r c8e4c505fe31 -r 62503fcb718d share/man/man1/cd.1
--- a/share/man/man1/cd.1       Sat Aug 31 20:16:25 2019 +0000
+++ b/share/man/man1/cd.1       Sat Aug 31 21:35:50 2019 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: cd.1,v 1.9 2019/08/31 17:34:46 sevan Exp $
+.\"    $NetBSD: cd.1,v 1.10 2019/08/31 21:35:50 uwe Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -40,24 +40,42 @@
 .Nd change working directory
 .Sh SYNOPSIS
 .Nm cd
-.Ar directory
+.Op Ar directory
 .Sh DESCRIPTION
-.Ar Directory
-is an absolute or relative pathname which becomes the new working
-directory.
-The interpretation of a relative pathname by cd depends on the
+Since
+.Nm
+affects the current shell execution environment, it is always provided
+as a shell regular built-in.
+For more information consult the manual page for the shell in use.
+.Pp
+The
+.Ar directory
+operand is an absolute or relative pathname which becomes the new
+working directory.
+The interpretation of a relative pathname by
+.Nm
+depends on the
 .Ev CDPATH
 environment variable (see below).
 .Sh ENVIRONMENT
-The following environment variables affect the execution of cd:
-.Bl -tag -width indent
+The following environment variables affect the execution of
+.Nm :
+.Bl -tag -width Ev
 .It Ev CDPATH
+A colon-separated list of pathnames that refer to directories.
 If the
 .Ar directory
-operand does not begin with a slash (/) character, and the first
-component is not dot (.) or dot-dot (..),
-.Nm cd
-searches for the directory relative to each directory named in the
+operand does not begin with a slash
+.Pq Ql \&/
+character, and the first
+component is not dot
+.Pq Ql \&.
+or dot-dot
+.Pq Ql \&.. ,
+.Nm
+searches for the
+.Ar directory
+relative to each directory named in the
 .Ev CDPATH
 variable, in the order listed.
 The new working directory is set to the first matching directory found.
@@ -75,13 +93,11 @@
 becomes the new working directory.
 .It Ev OLDPWD
 Set to the previous working directory after a directory change.
-Unsupported by
+Not supported by
 .Xr csh 1 .
 .It Ev PWD
 Set to the current working directory.
 .El
-.Pp
-For more information on environment variables consult manual for shell in use.
 .Sh EXIT STATUS
 .Ex -std cd
 .Sh SEE ALSO



Home | Main Index | Thread Index | Old Index