Like many (most), I use git, which by default sends its output (for diffs, logs, etc.) to
less, with the options
-FRSX. The options are overrideable in .gitconfig by setting the pager to be called with overriding options. E.g.:
pager=less -F -+S
When I set
less to quit after less than one screen of output and not truncate lines (i.e.
less -F -+S as in the example above), I get automatically returned to my command prompt after I run (say) a
However, if I do have it chop lines (i.e. use only
less -F), and any lines get truncated, then when it ends, it doesn't quit immediately, but prints
END and waits for me to press Q, which is somewhat annoying.
(Note that the problematic behaviour does not happen if no lines are truncated because they are all narrower than my terminal. The problem is not occurring because it is asked to truncate the lines, but that it is actually doing so.)
Is there a way to chop lines and still exit from
less automatically after less than a screen?