I have the following in my ~/.gitconfig:
[core]
pager = less -+$LESS -MR
This makes less to be used for git commands. git commands output contents in less irrespective of the size of the content. After I hit q, the whole content disappears, and I return to my clean bash prompt.
If I remove -+$LESS, it quits when I hit q or if the whole content can fit in one screen after printing it out. That is my bash prompt is not clear, it has previously shown output of the less command.
I can get the above behavior just by removing -+$LESS but I can't do it in normal bash prompt.
How can I get the behavior specified in the paragraph with -+$LESS inside normal bash commands and not only git commands?