News for hackers. Stuff that matters.
Re:I made a terminal pager by CGamesPlay on Wednesday April 15, 2026 @10:20PM (#47787901)
I am definitely waiting for a "modern less replacement" in the same vein as fd, sd, fzf, and the rest of the under-20yo cli crew. I get that "less" is reasonably maintained still.

I think the killer feature for me would be refresh. I get that this can't work for piped input, but I want `git diff` to show in a pager with a refresh button that holds my place. fzf supports both refresh and piped input, so perhaps there's some ideas there that could be leveraged.

Re:I made a terminal pager by zeech on Wednesday April 15, 2026 @10:36PM (#47787994)
I went looking for a 'new' pager a couple years back and settled on this [0]. I've since gone back to `less` since it got annoying jumping between systems and having different pagers, but when I used it it was quite nice.

[0] https://github.com/walles/moor

Re:I made a terminal pager by anthk on Thursday April 16, 2026 @02:59AM (#47789589)
That should be under a less(1) flag, but optional as it can mess piping.
Re:I made a terminal pager by busfahrer on Thursday April 16, 2026 @06:24AM (#47791070)
I've noticed that subconsciously, I've started to use `bat` for interactive paging, even though that's not its main use case
Re:I made a terminal pager by CGamesPlay on Thursday April 16, 2026 @07:10AM (#47791376)
Bat just uses less internally. And it deliberately breaks less’ handling of ^C, annoyingly.
Re:I made a terminal pager by indentit on Thursday April 16, 2026 @03:33PM (#47798364)
Bat has an option to use a built-in pager, a Rust crate called minus
Re:I made a terminal pager by CGamesPlay on Thursday April 16, 2026 @10:44PM (#47801958)
Didn't know that! I tried it and it doesn't work for me, sadly. Test case: `seq 1 100 | bat --pager=builtin` Result: immediate exit, no output printed at all.

https://github.com/sharkdp/bat/issues/1053

Re:I made a terminal pager by drabbiticus on Thursday April 16, 2026 @10:28AM (#47793487)
> holds my place

can you give an example of what you mean and how you might expect it to be achieved with a reloaded diff? otherwise `while true; git diff --color=always |less -r; done` gets you most of the way to what you are asking for

Re:I made a terminal pager by CGamesPlay on Thursday April 16, 2026 @10:39AM (#47793673)
Realistically, I will be reviewing a diff, see a hunk I don’t like, change it, and want to see the change back in less. So saving my scroll offset would accomplish my goal. I guess I should add that I want to be able to quit as well?

Like I said, fzf does this. Bind a key to an action that effectively changes the file from stdin to a different command that it runs, while preserving view state.

Re:I made a terminal pager by codethief on Thursday April 16, 2026 @11:54AM (#47795210)
+1 I actually came here hoping that OP had built a better `less`. Along with refresh, I'd also love to see mouse compatibility (scrolling etc.) and better performance when reading huge files.
Re:I made a terminal pager by ilyagr on Thursday April 16, 2026 @03:08PM (#47798040)
https://github.com/noborus/ov is another pager, in addition to `moor` that somebody else shared.
Re:I made a terminal pager by gnubison on Thursday April 16, 2026 @05:55PM (#47800020)
If you want ‘git diff | pager’ to work like that, you’re out of luck. There is no way for the pager to communicate with git or the shell to rerun the command; the pager doesn’t even know what program is on the writing side of its stdin pipe. You would need something like ‘pager --command "git diff"’, where the pager invokes a command producing output. I do agree that it would be nice.