3 ms·
less has a flag for that: (the gnu version does at least) -F or --quit-if-one-screen Causes less to automatically exit if the entire file can b
by rustyminnow 4y ago
less has a flag for that: (the gnu version does at least)
-F or --quit-if-one-screen
Causes less to automatically exit if the entire file can be displayed on the
first screen.
So one could just pipe everything through `less -F`. If a different $PAGER is preferred, well that'll be a little more involved.
(Also handy: add in `-X` to leave the contents on the screen when you exit less)
- bowmessage 4y agoNeat! Thanks for the tips.