summaryrefslogtreecommitdiffstats
path: root/misc-utils/whereis.c
diff options
context:
space:
mode:
authorSami Kerola2013-03-16 22:05:24 +0100
committerKarel Zak2013-03-19 16:09:38 +0100
commitccec32a121c717bbb7909d4db4095e67cfcf6e4f (patch)
treeea55f2b89b13d2e5ab50e2cf80970c28cf14363f /misc-utils/whereis.c
parentwhereis: align with howto-usage-function.txt (diff)
downloadkernel-qcow2-util-linux-ccec32a121c717bbb7909d4db4095e67cfcf6e4f.tar.gz
kernel-qcow2-util-linux-ccec32a121c717bbb7909d4db4095e67cfcf6e4f.tar.xz
kernel-qcow2-util-linux-ccec32a121c717bbb7909d4db4095e67cfcf6e4f.zip
whereis: support MANPATH environment variable
The MANPATH has been around long enough that it can be added to whereis default search path. Reference: manpath(1) Addresses: http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/whereis.c')
-rw-r--r--misc-utils/whereis.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c
index 1819f7c64..77d5ed461 100644
--- a/misc-utils/whereis.c
+++ b/misc-utils/whereis.c
@@ -475,6 +475,8 @@ int main(int argc, char **argv)
construct_dirlist_from_env("PATH", &ls, BIN_DIR);
construct_dirlist(&ls, MAN_DIR, mandirs);
+ construct_dirlist_from_env("MANPATH", &ls, MAN_DIR);
+
construct_dirlist(&ls, SRC_DIR, srcdirs);
for (i = 1; i < argc; i++) {