The less
command actually accepts a lot of configuration options. For instance, less -F <file>
will make the pager quit if the file can be displayed within one screen. We can also do export LESS='-F'
so specific options apply to all less
commands. That way, other commands that use less
like git
and man
will also benefit from the environment variable. Use man less
to read more about all the different kind of options you can use to make less
more. Here is a nice article that covers some interesting options.