0

If I use man to view man pages, they are not interactive at all, I can merely change the visuals through a pager.

With info I can view man and info pages with interactive links, including the links in "See Also" in man pages. But info strips all highlighting for man-pages and does not recognize other kinds of links, such as https links or file paths.

I know that there are web and GUI alternatives, but isn't there some command-line tool that provides a smoother experience and can ideally handle both formats in one?

xeruf
  • 551
  • 1
  • pinfo is a good suggestion, but my question has a fundamentally different focus, thus I think marking it as a duplicate would not be appropriate – xeruf Jul 01 '21 at 11:11
  • 1
    Duplicates aren’t about whether the questions are identical, but whether the answers to another question also answer the new question. The goal is to avoid duplicating answers. – Stephen Kitt Jul 01 '21 at 11:12
  • Maybe also https://unix.stackexchange.com/a/533772/70524 (and other options in that q) – muru Jul 01 '21 at 12:15
  • useful as well, but again a different focus. Maybe I'll just answer my question myself by now - though still I have not been convinced by any. The goal is to have the options much more condensed and really focused on the terminal. In all existing questions I have to scroll through lots of irrelevant answers to find what I'm looking for. – xeruf Jul 01 '21 at 18:58

2 Answers2

1

Pinfo is a text-based man and info viewer which provides interactive links between man pages and info nodes, but doesn’t handle HTTP links itself (its last release predates support for URLs in terminals; if your terminal recognises them, that will work).

Here it is showing the links at the end of the sprintf man page:

Screenshot of Pinfo showing the sprintf man page

Another option is w3mman, part of w3m, which has better defaults in my opinion but doesn’t support info pages:

Screenshot of w3mman showing the sprintf man page

Stephen Kitt
  • 434,908
1

I found the answer where I failed to look for a long time: vim It can view man pages and follow links, but even better, with https://gitlab.com/HiPhish/info.vim it will view info pages and fall back to manpages, all while staying interactive and colorful.

I used the following shell line to use it as a simple viewer:

info "$@" -w | grep -q . && $EDITOR -R -M -c "Info $*" +only

And of course there's Emacs, the master of info pages as both are from GNU, but I don't fancy launching that for quick terminal usage.

xeruf
  • 551