aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-03-19 10:30:40 +0000
committerRon Yorston <rmy@pobox.com>2018-03-19 10:30:40 +0000
commit4e14b2a8e2dbe1987586468cb0c79313d0af08cd (patch)
tree202ff0ecb9782468e9afdc7b2376df4da548f5d6
parent666f17d12f4aa30dc41a456157647bbe97dc5c99 (diff)
downloadbusybox-w32-4e14b2a8e2dbe1987586468cb0c79313d0af08cd.tar.gz
busybox-w32-4e14b2a8e2dbe1987586468cb0c79313d0af08cd.tar.bz2
busybox-w32-4e14b2a8e2dbe1987586468cb0c79313d0af08cd.zip
man: search for man pages relative to the executable
Add a 'man' directory in the same directory as the current BusyBox executable to the end of the list of paths searched for man pages. See GitHub issue #102.
-rw-r--r--miscutils/man.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/miscutils/man.c b/miscutils/man.c
index 6f74b5aaa..567323a88 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -314,6 +314,16 @@ int man_main(int argc UNUSED_PARAM, char **argv)
314 } 314 }
315 config_close(parser); 315 config_close(parser);
316 316
317#if ENABLE_PLATFORM_MINGW32
318 {
319 char *exepath = xstrdup(bb_busybox_exec_path);
320 char *relpath = concat_path_file(dirname(exepath), "man");
321 man_path_list = add_MANPATH(man_path_list, &count_mp, relpath);
322 free(relpath);
323 free(exepath);
324 }
325#endif
326
317 { 327 {
318 /* environment overrides setting from man.config */ 328 /* environment overrides setting from man.config */
319 char *env_pager = getenv("MANPAGER"); 329 char *env_pager = getenv("MANPAGER");