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
This commit is contained in:
Wolfram Schneider 1996-09-16 22:52:02 +00:00
parent 2237ee9753
commit fe0614bf6e

View File

@ -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);