Bug 79650 - less -F option isn't useful in gnome-terminal
Summary: less -F option isn't useful in gnome-terminal
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: less
Version: rawhide
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-14 16:06 UTC by Robin Green
Modified: 2013-07-02 22:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-21 14:57:55 UTC
Type: ---
Embargoed:


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

Description Robin Green 2002-12-14 16:06:42 UTC
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:
Always

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 19:29:13 UTC
This bug still exists in Rawhide.

Comment 2 Jindrich Novy 2005-09-08 15:07:14 UTC
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 15:08:46 UTC
I agree the -F option is useless though.

Comment 4 Robin Green 2005-09-14 23:19:05 UTC
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 13:01:57 UTC
This looks like a termcap issue IMO. Maybe Petr will help here.

Comment 6 Petr Raszyk 2005-10-21 12:16:02 UTC
Created attachment 120251 [details]
patch


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

less-392-capa-te.patch

Comment 7 Jindrich Novy 2005-10-21 12:19:13 UTC
Petr, thanks for your help! Reassigning back to less.

Comment 8 Jindrich Novy 2005-10-21 14:57:10 UTC
Created attachment 120257 [details]
A bit groomed patch applied to fix it.

Comment 9 Jindrich Novy 2005-10-21 15:01:05 UTC
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.