From 2497ecaf7d1e4c2a7b72f79e3497c758bde7c93a Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 29 Apr 2019 16:32:02 -0700 Subject: man: support MANPATH. (This and `git clone` is how I use the latest man7.org pages all the time instead of my system's man pages.) --- toys/pending/man.c | 1 + 1 file changed, 1 insertion(+) (limited to 'toys/pending') diff --git a/toys/pending/man.c b/toys/pending/man.c index 0e54e93c..82d3c2c9 100644 --- a/toys/pending/man.c +++ b/toys/pending/man.c @@ -159,6 +159,7 @@ void man_main(void) char **order = (char *[]) {"1", "8", "3", "2", "5", "4", "6", "7", 0}; TT.sufs = (char *[]) {".bz2", ".gz", ".xz", "", 0}; + if (!TT.M) TT.M = getenv("MANPATH"); if (!TT.M) TT.M = "/usr/share/man"; if (FLAG(k)) { -- cgit v1.2.3