Bug 868284

Summary: RFE: reverse mode (like an efficient built-in 'tac')
Product: [Fedora] Fedora Reporter: Michal Schmidt <mschmidt>
Component: lessAssignee: Matej Mužila <mmuzila>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: mattdm, odubaj, praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-02 10:40:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Schmidt 2012-10-19 12:15:01 UTC
Matthew Miller had an interesting idea (https://bugzilla.redhat.com/show_bug.cgi?id=867841#c5):
> It's too bad less doesn't have an "upside down" mode where it reverses
> the input, starts at the end and loads more data as one scrolls up.
> If it did, journalctl could default to serializing in reverse order,
> and then the upside down mode would invert again, presenting it in
> chronological order but starting from the end.

It would be nice if less had a "--reverse" option that would act as a built-in 'tac' filter. In other words, the first line read from the input file would be displayed as the most bottom line.

The difference versus just using 'tac' would be that when combined with "+G" the input lines could be read from a pipe progressively as the users scrolls up from the initial bottom.

Comment 1 Martin Bříza 2012-10-25 15:55:06 UTC
This sounds reasonable and it shouldn't be so hard to implement to be fast enough...

Comment 2 Matthew Miller 2013-03-25 17:33:04 UTC
I know this can't be super high-priority, but I've got systemd with `journalctl -r` now so I'm excited to see this part too. :)

Comment 3 Martin Bříza 2013-03-26 10:56:22 UTC
Yes, well, I have discussed this with Mark Nudelman (the upstream) regarding what it would involve to implement this. It seems the amount of work I estimated at the first glance wasn't so small as I thought:
Of course simple browsing and paging through the text wouldn't be a problem. The problem here lies in the fact less provides some quite advanced functionality such as searching for matching braces, jumping to a percentage of the whole document or one particular line number.
All of this (and possibly more) would need modification to be consistent with the UI that the "regular" top->bottom mode uses.
In conclusion, I'm sorry for my low responsiveness in regards of this issue and for the fact I currently simply don't have enough time to spend implementing this.

Comment 4 Fedora Admin XMLRPC Client 2013-04-03 07:17:05 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Admin XMLRPC Client 2013-07-11 12:52:24 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora Admin XMLRPC Client 2013-07-11 12:57:56 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora Admin XMLRPC Client 2013-08-15 10:56:24 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Fedora Admin XMLRPC Client 2015-07-08 08:20:35 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Viktor Jancik 2015-07-23 12:48:01 UTC
I will contact upstream again whether this RFE is feasible. If I start working on it, I will change it to ASSIGNED again.

Comment 12 Fedora Admin XMLRPC Client 2016-03-24 18:01:01 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.