Hacker News new | ask | show | jobs
by armchairhacker 1267 days ago
I'm surprised there aren't more pagers besides `less` and `more`. Alternatives I've found online:

- https://linux.die.net/man/1/most (multiple files/windows at once)

- https://github.com/sharkdp/bat (uses `less` under the hood, syntax highlighting and git diffs)

- https://linux.die.net/man/1/lesskey (add parameters to `less`)

- https://github.com/ivanov/kanten (looks abandoned)

- "Just use vim" (and vim's paging is really good, so this is viable, in fact probably the most viable so far)

`less` is a great program, despite being old there aren't really many flaws. It's one of those tools that don't really need updates or improvements. But I do think there are a few features which would be nice to have (automatic ANSI coloring, tailing, syntax highlighting, support for files like sqlite and tar - which of which are in ov).

The one thing which `less` may have over `ov` (besides already being on most distros) is speed. `less` takes in really large files, or forever terminal output, and is still really fast. And I find that when I use `less` I use it with large files or terminal output often. Though I don't actually know if `ov` is any slower, it's something the dev should watch out for (I don't see "speed" mentioned in the README).

7 comments

First of all please keep in mind that "less" is wonderfully updated https://github.com/gwsw/less ov is built for speed, but "less" is often better. "bat" is a nice application, but it's not a pager. I believe "bat" is not suitable for opening large files. https://twitter.com/noborus/status/1610111558574804993?s=20&...
ANSI coloring and tailing is supported by less. Press F to start tailing. Many programs detect if they are redirected to a pipe and then stop to emit ANSI color codes.
There's also moar, written in go:

- https://github.com/walles/moar

I find myself using cat or less even thought I have bat around because copying from cat or less works best and you don't get line breaks inserted.
I'm a fan of lnav, more for log files but incredibly useful:

https://lnav.org/

pspg ( https://github.com/okbob/pspg ) is wonderful for tabular data.