Mouse scroll stopped working with Less in Terminal
After going through a few other answers, I've realized there is a $LESS environment variable that contains default flags.

It's empty on my other Mac and Ubuntu system, but for some reason it's equal to -FRX on this machine, and that's causing these issues:


-X caused it to NOT accept mouse scrolls
-F caused it to automatically exit for small files


Which is weird, since I never changed it, so it must've been modified by some other program. Anyways, manually setting it in my .rc files fixed the issue:

export LESS="-R"




Sources:


Unix &amp; Linux: Neither 'less' or 'less -X' clear screen on exit
SuperUser: Less command clearing screen upon exit