tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Support $MANPAGER in man(1)

On 10.09.2017 19:09, Sevan Janiyan wrote:
> Hello,
> Attached patch adds support for $MANPAGER environment variable. It's
> currently lacking the documentation patch, but I thought I'd post the
> change for code first in case the change is rejected.
> Thoughts? / ok to commit with man page update?
> Sevan

I would unify _PATH_PAGER as "/usr/bin/more" and store it in <paths.h>.

It's currently defined individually in: man(1), catman(1) (not used
here?), quiz(6), wump(6). makemandb(8), msgs(1).

mail(1), fish(6) and cribbage(6) define it as _PATH_MORE.

makemandb(8) cannot handle defined but empty PAGER="". It attempts to
popen(3).. and this operation seems to be legal in my local tests.

Simplified patch for the man(1) part:

check_pager() will now append " -s" to _PATH_PAGER if "/usr/bin/more".

I would introduce MANPAGER into makemandb(7) and man(1) in one go.

Attachment: signature.asc
Description: OpenPGP digital signature

Home | Main Index | Thread Index | Old Index