Is there a command line option that will allow less to return to the command line if there are not sufficient lines in the file to warrant paging.

Sure I have seen it in the past but can't find the option in help.

link|improve this question

65% accept rate
feedback

1 Answer

up vote 13 down vote accepted

See manpage:

-F or --quit-if-one-screen

Causes less to automatically exit if the entire file can be displayed on the first screen.

link|improve this answer
2  
+1 - Goes off and aliases less to less -F – Nifle Aug 12 '10 at 8:55
1  
Not sure I see the point of -F by itself as (at least on my Linux) doesnt display any of the file. But combined with -X it does what I want. Thanks. – justintime Aug 12 '10 at 15:47
The different behaviors are explained in this SU question and answer and even more in the blog linked from there. superuser.com/questions/134598/… fixlog.blogspot.com/2006/09/… – mankoff Aug 13 '10 at 19:29
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.