3 ms·
Maybe pipe output of every command into a script that invokes $PAGER when the output is long enough?
by bowmessage 4y ago
Maybe pipe output of every command into a script that invokes $PAGER when the output is long enough?
- rustyminnow 4y agoless 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.