Bug 79650

Summary: less -F option isn't useful in gnome-terminal
Product: [Fedora] Fedora Reporter: Robin Green <greenrd>
Component: lessAssignee: Jindrich Novy <jnovy>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: jnovy, nalin, pknirsch, praszyk, zcerza
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-21 14:57:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch
none
A bit groomed patch applied to fix it.
none
Sorry, this is the right one. none

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.