upvote
I've always been baffled why we just hand the man pages over to a normal pager rather than something that actually understands their structure. That "look up a flag" case is exactly what bothers me constantly when viewing man pages. And the search they say they should be using doesn't even work consistently since the flag might not be the first non-whitespace thing on a line if there's aliases.
reply
I have played with that idea for a while until I realized I was creating a poor man's web browser in the terminal.

At that point I started wondering if converting my man folder to HTML and using lynx[1] wasn't a better idea.

I ended up using vanilla man again.

Are there better/fancier manpage readers out there that can change my mind?

[1]: https://lynx.invisible-island.net/current/

reply
I tend to read man pages in Emacs, which comes with a 'man' command (invoking that executable) and a 'woman' command (an alternative implemented entirely within Emacs), which both implement a basic amount of hyperlinking in their display. For example, I just tried it with the 'rg' manual (first suggestion when I ran `man`), which says:

> Like other tools such as ls, ripgrep will alter its output

That `ls` is marked-up, so pressing RET on it will open the manual for the `ls` command; which includes:

> FORMAT is interpreted like in date(1).

Again, that `date` is marked up, so pressing RET on it `date` will open the manual for the `date` command; etc.

It's obviously just going on heuristics though; e.g. the `ls` manual has marked-up the `--sort` option, and if I hit RET on that it takes me to the manual for the `sort` command ;-)

reply