Bug 79650 - less -F option isn't useful in gnome-terminal
less -F option isn't useful in gnome-terminal
Product: Fedora
Classification: Fedora
Component: less (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Jindrich Novy
Depends On:
  Show dependency treegraph
Reported: 2002-12-14 11:06 EST by Robin Green
Modified: 2013-07-02 18:57 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-21 10:57:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch (497 bytes, text/x-patch)
2005-10-21 08:16 EDT, Petr Raszyk
no flags Details
A bit groomed patch applied to fix it. (497 bytes, patch)
2005-10-21 10:57 EDT, Jindrich Novy
no flags Details | Diff
Sorry, this is the right one. (564 bytes, patch)
2005-10-21 11:01 EDT, Jindrich Novy
no flags Details | Diff

  None (edit)
Description Robin Green 2002-12-14 11:06:42 EST
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):

How reproducible:

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

Additional info:
Comment 1 Zack Cerza 2004-07-21 15:29:13 EDT
This bug still exists in Rawhide.
Comment 2 Jindrich Novy 2005-09-08 11:07:14 EDT
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
purpose instead.
Comment 3 Jindrich Novy 2005-09-08 11:08:46 EDT
I agree the -F option is useless though.
Comment 4 Robin Green 2005-09-14 19:19:05 EDT
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.
Comment 5 Jindrich Novy 2005-10-19 09:01:57 EDT
This looks like a termcap issue IMO. Maybe Petr will help here.
Comment 6 Petr Raszyk 2005-10-21 08:16:02 EDT
Created attachment 120251 [details]

Discussed with jnovy@redhat.com. There was a patch for 'less' prepared.
We will fix the issue above as BUG IN LESS.

Comment 7 Jindrich Novy 2005-10-21 08:19:13 EDT
Petr, thanks for your help! Reassigning back to less.
Comment 8 Jindrich Novy 2005-10-21 10:57:10 EDT
Created attachment 120257 [details]
A bit groomed patch applied to fix it.
Comment 9 Jindrich Novy 2005-10-21 11:01:05 EDT
Created attachment 120258 [details]
Sorry, this is the right one.

Note You need to log in before you can comment on or make changes to this bug.