diff options
author | wosch <wosch@FreeBSD.org> | 1996-09-16 22:52:02 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1996-09-16 22:52:02 +0000 |
commit | 7393f67a3ada5f2ccabaa342bc00a7238c3b57f6 (patch) | |
tree | 6be1d4da0ac5ba374a39646b71aa32ef8262b620 /gnu | |
parent | ea1853644ebb937ab3a6063f04db8c8f35a8853f (diff) | |
download | FreeBSD-src-7393f67a3ada5f2ccabaa342bc00a7238c3b57f6.zip FreeBSD-src-7393f67a3ada5f2ccabaa342bc00a7238c3b57f6.tar.gz |
Set enviroment variable PAGER=pager if using option `man -P pager'
This inherit variable PAGER for childs like whatis(1), e.g.
`man -P less -k man' should now work like expected. Close PR#1068
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/man/man/man.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gnu/usr.bin/man/man/man.c b/gnu/usr.bin/man/man/man.c index 510dae6..e9259b9 100644 --- a/gnu/usr.bin/man/man/man.c +++ b/gnu/usr.bin/man/man/man.c @@ -315,6 +315,8 @@ man_getopt (argc, argv) break; case 'P': pager = strdup (optarg); + if (setenv("PAGER", pager, 1) != 0) + (void)fprintf(stderr, "setenv PAGER=%s\n", pager); break; case 'S': colon_sep_section_list = strdup (optarg); |