Module Name: src
Committed By: uwe
Date: Sat Aug 31 21:35:50 UTC 2019
Modified Files:
src/share/man/man1: cd.1
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man1/cd.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/man/man1/cd.1
diff -u src/share/man/man1/cd.1:1.9 src/share/man/man1/cd.1:1.10
--- src/share/man/man1/cd.1:1.9 Sat Aug 31 17:34:46 2019
+++ src/share/man/man1/cd.1 Sat Aug 31 21:35:50 2019
@@ -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 @@ environment variable exists and contains
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