The description of ksh(1)'s handling of CDPATH is not quite complete
and, worse, contradictory in the two locations it's mentioned. sh(1)
barely touches on it but is Not Wrong so I've left it alone.

(FWIW I also checked the CDPATH scanning code and actually poked
at a real shell so I've confirmed that this is how it actually works)

Matthew

--- /usr/src/bin/ksh/ksh.1      Sat Oct  5 11:03:46 2019
+++ /tmp/ksh.1  Sun Nov 24 05:29:03 2019
@@ -1341,7 +1341,7 @@
 .Ev CDPATH
 is set and does not contain
 .Sq \&.
-or contains an empty path, the current directory is not searched.
+or an empty path, the current directory is not searched.
 Also, the
 .Ic cd
 built-in command will display the resulting directory when a match is found
@@ -2866,7 +2866,9 @@
 .Ar dir .
 A
 .Dv NULL
-path means the current directory.
+path or
+.Ql .\&
+means the current directory.
 If
 .Ar dir
 is found in any component of the

Reply via email to