summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-06-19 12:04:22 +0000
committertjr <tjr@FreeBSD.org>2002-06-19 12:04:22 +0000
commit6b197bb7642db36d95a1eca09200d8c9b0a71dae (patch)
treecb7d5f0f700c355379132500523399404e77c7d9 /bin
parentaff5678b6e0338a9e3059960ad3bf60e3d2bfa9e (diff)
downloadFreeBSD-src-6b197bb7642db36d95a1eca09200d8c9b0a71dae.zip
FreeBSD-src-6b197bb7642db36d95a1eca09200d8c9b0a71dae.tar.gz
Bring documentation on CDPATH and its effects on cd(1) back into sync with
reality (and POSIX): current directory isn't searched unless CDPATH has a "." element or is unset. PR: 38442 Submitted by: oleg dashevskii <be9@be9.ru> MFC after: 1 week
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/sh.110
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index c1d774f..d7b6594 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -1289,16 +1289,18 @@ environment variable if no
is specified.
If
.Ar directory
-is not found as a subdirectory of the current directory
-(and does not begin with
-.Pa / , ./ ,
+does not begin with
+.Pa / , . ,
or
-.Pa ../ ) ,
+.Pa .. ,
then the directories listed in the
.Ev CDPATH
variable will be
searched for the specified
.Ar directory .
+If
+.Ev CDPATH
+is unset, the current directory is searched.
The format of
.Ar CDPATH
is the same as that of
OpenPOWER on IntegriCloud