mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
95d690a249
commit
5cf53bcf1a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue