'less' command clearing screen upon exit - how to switch it off?
Problem
How to force the program to not clear the screen upon exit? I'd like it to behave like command: it leaves the recently seen page on screen upon exiting it does not exit the even if the content fits on one screen (try ) Any ideas? I haven't found any suitable options nor env variables in a manual, I suspect it's set via some env variable though.
Error Output
less
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: 'less' command clearing screen upon exit - how to switch it off?
To prevent from clearing the screen upon exit, use . From the manpage: -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. As to less exiting if the content fits on one screen, that's option : -F or --quit-if-one-screen Causes less to automatically exit if the entire file can be displayed on the first screen. is not the default th…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix