I made a terminal pager
109 points
7 hours ago
| 13 comments
| theleo.zone
| HN
CGamesPlay
3 hours ago
[-]
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.

reply
zeech
3 hours ago
[-]
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

reply
jzer0cool
6 minutes ago
[-]
Was curious but the git link there doesn't load?
reply
ancientcatz
3 hours ago
[-]
If I remember correctly, `gum` also provides a pager feature: https://github.com/charmbracelet/gum
reply
netghost
2 hours ago
[-]
TIL about `gum`. I love this and endeavor to integrate it into something sometime. Thank you for mentioning it!
reply
project2501a
2 minutes ago
[-]
Oh, you will love all of charmbracelet

https://github.com/charmbracelet

reply
thegdsks
1 hour ago
[-]
How does this compare to less with syntax highlighting? I've been using bat as a pager (bat --paging=always) and it covers most of what I need. Curious what the advantage is for larger files.
reply
vomayank
5 hours ago
[-]
Interesting project.

What was the main limitation in existing pagers like less that pushed you to build a new one?

reply
lrobinovitch
5 hours ago
[-]
Author here!

If I were to give this post a longer title, it would be "I made a terminal pager because I needed a really good viewport component for my Go TUIs, then realized that a TUI viewport is just a mini terminal pager and I want the same text navigation and manipulation experience everywhere that I encounter long text blocks in my terminal".

I take no issue at all with `less`, it's super powerful and configurable as I call out in the post. I took the functionality I needed, made it a reusable component for Go TUIs, then made a terminal pager in the form of a Go TUI with it.

reply
ghthor
3 hours ago
[-]
Still use Wander everyday <3
reply
gandreani
6 hours ago
[-]
I really like this post! I think it's the clearest explanation I've seen of the different characteristics of utf-8 strings
reply
pimlottc
7 hours ago
[-]
The TL;DR doesn’t really say what this new pager offers compared to less; it seems to mostly be a learning project:

> lore supports only a subset of what less does, but in a more intuitive and useful manner for my daily activity. I also find value in understanding it from the ground up, bytes to terminal views, and continuing to refine it as I learn more about what I actually want and need in a terminal pager.

reply
mnkyprskbd
4 hours ago
[-]
bat is the king of pagers. https://github.com/sharkdp/bat
reply
asibahi
4 hours ago
[-]
Doesn’t it just call `less`?
reply
joombaga
2 hours ago
[-]
Yes. It calls the default pager (or whatever you specify).
reply
saghm
3 hours ago
[-]
I like it a lot more than `less`, but unfortunately it's always a lot slower when first opening really large files. I'm not sure if it's eagerly loading the whole thing (maybe because that's needed for AST parsing in the case of syntax highlighting, although it happens even on files without highlighting), but there are times I have to swap to `less` still.
reply
teki_one
4 hours ago
[-]
reply
dostick
5 hours ago
[-]
From the title I thought it’s about a dead man’s switch.
reply
nkoren
2 minutes ago
[-]
I thought it was about replicating a mossad supply chain attack.
reply
jauntywundrkind
3 hours ago
[-]
It's not great but I made a typescript library to wrap pickers recently, such as skim, fuzzel, fzf, dmenu, rofi, etc. Some very similar problems.

Would love if anyone has thoughts or suggestions. It was quick and dirty, and works fine for my use, but I'm not sure where else I could take this, how else I might splice apart the problem, what else would suit it. https://tangled.org/jauntywk.bsky.social/picker-power

reply
fragmede
5 hours ago
[-]
A Splunk, a Splunk! My kingdom for a Splunk!

(too bad Cisco bought them and made it too expensive).

Also, no "less does more than more and most does more than less" joke?

reply
sourcegrift
3 hours ago
[-]
Also called `vi -`
reply
cocodill
6 hours ago
[-]
For a bubbletea application I'd expect more bubbles and tea there. But still, nice project.
reply