Is there a way to run less without reverting the screen afterward?

0

I much prefer less over more for paging output since it has a much nicer command interface. However, it has the very annoying feature of clearing the screen back to its original state on exit. The one feature of more that I like is that it leaves the screen alone so you can see the state it was in when you decided to exit (usually at the end of the file).

Even running less in the LESS_IS_MORE emulation mode, the screen is cleared. Is there a way to prevent less from doing this?

Systerious Manger

Posted 2019-03-15T03:11:53.680

Reputation: 1

Question was closed 2019-03-15T04:14:01.147

Answers

0

less -X file

From the less man page:

-X or --no-init

Disables sending the termcap initialization and deinitialization strings to the terminal. This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen.

baelx

Posted 2019-03-15T03:11:53.680

Reputation: 2 083