Sunday, June 3, 2007

How to make the 'less' command not clear screen after exit?

You can use the use option:
-X or --no-init

e.g. alias less='less -X'
If you want to use it long term, the PAGER is a useful variable to set in your .bashrc files:
export PAGER='less -X'
To make less exit if the content fits on one screen, use:
-F or --quit-if-one-screen

export ACK_PAGER='less -RFX'

No comments:

Post a Comment