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

Re: tip of the day: stop prevent 'man' from clearing the screen on exit

On Thu, 2003-04-10 at 23:50, Benjamin Rutt wrote:
> So, the fix was to do a
>     export LESS=X
> in my ~/.bashrc.  This avoids the screen clearing "problem" on exit
> for regular uses of 'less' as well.

As the manual page for less(1) states, this stops less from initializing
the terminal.  On some systems (such as my Red Hat Linux 7.3 server),
this also stops the cursor keys performing scrolling, so use of this
option may be a compromise if prefer using the cursor keys.

There are indeed a number of other useful less(1) options.  I have $LESS
set to "egiJMqWX", which is about half of the options that can be set. 
The one downside to doing this is: when you use your profile on a system
that has an older version of less, some of the options are not
supported, and this causes a major error.  I guess the "X" option has
been around for a while, however.

Michael Wardle <michael.wardle@adacel.com>
Adacel Technologies

Reply to: