aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2021-01-30 08:36:08 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-01-30 08:36:08 +0100
commit5cf53bcf1ab1bafcdfd08672fcdde4d82c09b4e5 (patch)
tree201eb6543b9d5f56e59acf96edbac5b24382a489
parent95d690a2491e51a7c274a332b9c0d59f7ef4ebec (diff)
downloadman-pages-5cf53bcf1ab1bafcdfd08672fcdde4d82c09b4e5.tar.gz
environ.7: Improve the description of PATH
Add more details of how PATH is used, and mention the legacy use of an empty prefix. Changed after a suggested patch by Bastien Roucariès. Reported-by: Bastien Roucariès <rouca@debian.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man7/environ.718
1 files changed, 16 insertions, 2 deletions
diff --git a/man7/environ.7 b/man7/environ.7
index dd35050b25..11dfb48629 100644
--- a/man7/environ.7
+++ b/man7/environ.7
@@ -98,8 +98,22 @@ The sequence of directory prefixes that
.BR sh (1)
and many other
programs employ when searching for an executable file that is specified
-as a simple filename (containing no slashes).
-The prefixes are separated by \(aq\fB:\fP\(aq.
+as a simple filename (i.a., a pathname that contains no slashes).
+The prefixes are separated by colons (\fB:\fP).
+The list of prefixes is searched from beginning to end,
+by checking the pathname formed by concatenating
+a prefix, a slash, and the filename,
+until a file with execute permission is found.
+.IP
+As a legacy feature, a zero-length prefix
+(specified as two adjacent colons, or an initial or terminating colon)
+is interpreted to mean the current working directory.
+However, use of this feature is deprecated,
+and POSIX notes that a conforming application shall use
+an explicit pathname (e.g.,
+.IR . )
+to specify the current working directory.
+.IP
(Similarly one has
.B CDPATH
used by some shells to find the target