'less' doesn't clear screen after quit

Posted by Dana on Super User See other posts from Super User or by Dana
Published on 2011-06-30T14:30:01Z Indexed on 2011/06/30 16:25 UTC
Read the original article Hit count: 275

Filed under:
|
|
|
|

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.

Thanks!

© Super User or respective owner

Related posts about mac

Related posts about bash