7
1
On my Debian machine here, less
always opens the alternate screen to show stuff.
This is annoying, if there are only 2 or 3 lines to be displayed. I'd like less
to:
work as pager, if there is more than a screenful of information
and work like
cat
, if there's not.
Apparently, less
has the -F
flag for "single screen" cases:
-F or --quit-if-one-screen
Causes less to automatically exit if the entire file can be displayed on the first screen.
But in my case it just exits again, and no info is displayed. It's more like cat /dev/null
and thus not really useful.
Has anyone an idea, how to achieve this less
behaviour?
Cool, that is quite exactly what I was looking for. That the screen is not cleared is just a minor drawback. – Boldewyn – 2010-11-26T19:52:48.557