The information is on the manual page for man
. It's in the section on environment variables.
If neither MANPAGER
nor PAGER
exist in the environment, the man
command behaves as follows. If coloured manuals are requested, it invokes less -sR
; otherwise it invokes more -s
.
The behaviour of the less
and more
commands, in turn, is that less
does not quit at end of file by default whereas more
does.
So the simplest approach, which is what I do myself, is to turn coloured manuals on. In my ~/.login_conf
I have (omitting some irrelevant environment variables):
me:\
:setenv=MANWIDTH=tty,MANCOLOR=1,MANITALIC=1:\
:hushlogin:
The MANWIDTH
and MANCOLOR
environment variables are documented in that same part of that same manual page.
The MANITALIC
environment variable invokes a patch to man
that I wrote that turns on grotty
's (already present) ability to generate italic ECMA-48 output, making all of the manual pages that are marked up with things like .I
and .BI
generate actual italic text on my screen. My terminal supports italics. If yours does too (and many do), you might like to try this.
~/.login_conf
is FreeBSD's shell-agnostic way of setting environment variables for an interactive login session, by the way. You can use your shell-specific mechanism, whatever your shell of choice is, if you like. man login.conf
. ☺
Further reading
echo $MANPAGER
show anything? Orecho $LESS
?