The default behavior for 'less' is to clear the screen after quitting. This behavior stopped when I started using:
export TERM=xterm
Now 'less' leaves the last page I viewed on the screen, and I want to re-enable the default behavior of clearing the screen.
Googling this problem I found that people use the following command in their ~/.screenrc
:
altscreen on
I'm not sure if this is a mac-issue but I don't have this command available.
I'm using bash shell on Mac terminal and I have no $LESS
environment variable defined.
screen
. This one has nothing to do withscreen
, as evidenced by, "I don't have [altscreen
] available" and "I'm using bash shell on Mac terminal." – peth Jun 30 '11 at 19:02less
like:less -+F -+X <file>
? If that changes the behavior, your less is configured to behave that way somewhere in you system configuration. If not, it's likely that your terminal doesn't support the alternate screen feature or doesn't have it enabled. You'd need the reverse of superuser.com/questions/136162/… or get a terminal that has the alternate screen feature. – peth Jun 30 '11 at 19:11export TERM=xterm
. Thanks for your help! – Dana Jul 1 '11 at 16:02