[ale] man man

Michael B. Trausch mike at trausch.us
Mon Jul 19 13:25:13 EDT 2010


On Mon, 2010-07-19 at 10:39 -0400, Scott McBrien wrote:
> It's a less option to not clear the screen on exit.
> 
> There is a less variable that contains commandline arguments for less.
> I don't remember the option off the top of my head, but it is in the
> less man page, as is the variable that holds the less arguments.
> Something like:
> export LESS_OPTS="-c"
> 
> But again, check the man page for both variable name and command opt. 

As rs at ale.spam.futz.org pointed out, use the LESS shell variable to
control the behavior of the less pager.  To make it all explicit, I'd do
the following in your shell's startup script:

MANPAGER=less
LESS='-X'

export MANPAGER LESS

Then all your shell sessions will have the same behavior.

What I don't know is whether or not there will be any side effects, the
man page says this:

        -X or --no-init
              Disables  sending  the termcap initialization and deini-
              tialization strings to the terminal.  This is  sometimes
              desirable  if the deinitialization string does something
              unnecessary, like clearing the screen.

It would seem to me like this could mean that you may occasionally have
terminal states that less won't be able to deal with; you might have to
use the reset(1) command to make things work properly in such an event.

	--- Mike



More information about the Ale mailing list