From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202
Description of problem:
I would like to alias less to less -F so that I don't have to press q to quit
less when viewing a short file. However, this only works on a real Linux
console; in gnome-terminal, less displays files in a special virtual window or
something, so the net effect is that less -F shortfile.txt does nothing.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Open a gnome-terminal
2. echo foo | less -F
Actual Results: gnome-terminal flashes briefly and displays nothing
Expected Results: "foo" should be output
This bug still exists in Rawhide.
less uses ncurses for displaying file content on the screen and restores the
original content on exit. Note that less is not intended for diplaying file
contents on terminal non-interactively. You can use cat or something for this
I agree the -F option is useless though.
The -F option is not useless per se. It works fine on the linux console (and
also in the "screen" terminal emulator, I have since found out). What I'm
requesting here is for it to also work, in the same way, in the gnome-terminal
terminal emulator. (The bug title could be better phrased, I admit.)
What needs to be done here, I believe, is add logic to less to not send the
special ANSI sequences that it normally sends, if -F is supplied and the file is
less than one screenful long.
This looks like a termcap issue IMO. Maybe Petr will help here.
Created attachment 120251 [details]
Discussed with firstname.lastname@example.org. There was a patch for 'less' prepared.
We will fix the issue above as BUG IN LESS.
Petr, thanks for your help! Reassigning back to less.
Created attachment 120257 [details]
A bit groomed patch applied to fix it.
Created attachment 120258 [details]
Sorry, this is the right one.