Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/share/man/man1 Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/ec2aea37892b
branches: netbsd-9
changeset: 453960:ec2aea37892b
user: martin <martin%NetBSD.org@localhost>
date: Sun Sep 01 14:20:00 2019 +0000
description:
Pull up following revision(s) (requested by sevan in ticket #153):
share/man/man1/cd.1: revision 1.10
share/man/man1/cd.1: revision 1.9
Direct reader to shell documentation generally, rather than csh(1)
specifically.
Mention variables OLDPWD and PWD.
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 | 55 ++++++++++++++++++++++++++++++++++++----------------
1 files changed, 38 insertions(+), 17 deletions(-)
diffs (95 lines):
diff -r edd4197b54a3 -r ec2aea37892b share/man/man1/cd.1
--- a/share/man/man1/cd.1 Sun Sep 01 14:15:24 2019 +0000
+++ b/share/man/man1/cd.1 Sun Sep 01 14:20:00 2019 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: cd.1,v 1.8 2017/07/04 06:33:13 wiz Exp $
+.\" $NetBSD: cd.1,v 1.8.8.1 2019/09/01 14:20:00 martin Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -32,7 +32,7 @@
.\"
.\" @(#)cd.1 8.1 (Berkeley) 6/5/93
.\"
-.Dd June 5, 1993
+.Dd August 31, 2019
.Dt CD 1
.Os
.Sh NAME
@@ -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.
@@ -73,15 +91,18 @@
.Ev HOME
environment variable exists and contains a directory name, that directory
becomes the new working directory.
+.It Ev OLDPWD
+Set to the previous working directory after a directory change.
+Not supported by
+.Xr csh 1 .
+.It Ev PWD
+Set to the current working directory.
.El
-.Pp
-See
-.Xr csh 1
-for more information on environment variables.
.Sh EXIT STATUS
.Ex -std cd
.Sh SEE ALSO
.Xr csh 1 ,
+.Xr ksh 1 ,
.Xr pwd 1 ,
.Xr sh 1 ,
.Xr chdir 2
Home |
Main Index |
Thread Index |
Old Index