i feel like i've probably asked this before but has anyone written a fancy command line man page viewer to replace `man`?
(not emacs or vim)
i feel like i've probably asked this before but has anyone written a fancy command line man page viewer to replace `man`?
(not emacs or vim)
@b0rk I know you said no emacs but I really like the in-built emacs package called `woman`.
@b0rk tangent: I've been using Linux for 27 years but I'm still unclear on why sometimes typing "man 5 {command}" gives me a different and more detailed man page.
@b0rk (now I know the answer)
@literatesavant what's the answer?
@b0rk there are 8 "sections" of the man page. I thought they were "levels."
1: user commands
2: system calls
3: library functions
4: special files (devices and stuff)
5: file formats
6: games!
7: miscellaneous
8: system admin commands
So if you run "man crontab" you will see the crontab command arguments, and if you run "man 5 crontab" you will see the crontab file format.
@b0rk Not replace, but this script opens in a PDF viewer:
https://www.softwolves.com/wolfblog/2024/11/19/making-man-pages-easier-to-read/
I did write a simple HTML man page render back at university (1997), I wonder if I still have the sources for that...
@b0rk Maybe something like manx? It's for macOS but it is just a bash script so maybe it could be tweaked for other platforms.
@b0rk https://github.com/filiparag/wikiman
or I also use Television for fuzzy finding and then opening the pages in bat with man.
@b0rk I use [bat](https://github.com/sharkdp/bat) with this env var `export MANPAGER="sh -c 'col -bx | bat --language man --plain'"`
This look like this.
qman looks interesting but on my machine it takes several seconds to start https://github.com/plp13/qman
@b0rk Looks like a nice tui version of xman, which is one of my favorite guis.
@b0rk batman from bat ?
@b0rk I guess there's gnu's `info`... And of course each `man` implementation is different; I'm partial to openbsd's, but it is the antithesis of fancy.
@b0rk there are too many to list. `yelp` (Gnome Help) comes to mind. `tldr` is a different approach. Then there are "smart" terminals, integrations, and a host of other things all trying to help us execute commands properly.
@b0rk I use man with MANPAGER set to `less -ic --use-color -Dd+g -Duc`. Not super fancy, but has a few colors.
@b0rk Ugggggh if you find a good answer, please repost it with a bright red light. I think the biggest issue is that the roff format is too bankrupt, and we need better linking primitives, but… I might just be jaded.
@b0rk related but maybe outside of the scope of your question: I have tried to fire woman (mode from emacs) once. But it wasn't as straightforward as thought and I didn't dig further. As I spent more and more time in emacs, I used woman directly and had less need to implement the "trick".
The reason, because there is one except for using emacs itself 😉 is to have the ability to see and navigate the page with a menu and perform search, and filters with tools like Occur that I'm familiar with.
@b0rk I've been using tldr pages instead of man recently: https://github.com/tldr-pages/tldr-python-client?tab=readme-ov-file
Works pretty well and looks nice!
@b0rk there's a script to use bat for man pages (aptly called batman) https://github.com/eth-p/bat-extras, for syntax highlighting and some other stuff
@b0rk have routinely lamented the fact that there isn't a version called woman
@clarfonthey I thought about this while trying some of the options. I came to the conclusion that it would be weird to tell a woman to (please) look something up for me.
I remembered that factory_girl (a ruby library to create test factories) was renamed to factory_bot a while ago. There is a blog post about it, the reasoning is similar.
https://thoughtbot.com/blog/factory_bot#why
Then I found a comment by a woman arguing it's potentially overblown and now I'm confused.
https://github.com/thoughtbot/factory_bot/issues/921#issuecomment-243173849
It's quite an interesting discussion on feminism from almost 10 years ago. The maintainers decided to rename the project even though the comments that argued for the change did get a lot of thumbs down.
Another thought was that woman would be too much to type, I'd prefer something like gal.
qman looks nice, but since it seems to be slow, I didn't bother trying harder. I think I'll give batman a try and also found out about tldr and might test some other things.
I guess if there is a rust implementation of qman, it could be either called gal, or it couldn't.
That was an interesting and productive couple of hours of procrastination, thanks for the question @b0rk
@radieschen @b0rk honestly, I'm going to have to agree with the notion that people are thinking way too much into it
that said, I personally don't even fully type out most commands; for example, I have g aliased to git, and that's only 3 letters
@b0rk man $1 | lolcat
Fancy ✨️
@b0rk You can read them with bat using batman. Only mildy fancy, though.
@b0rk May be some stuff worth trying here: https://alternativeto.net/software/linux-man-pages/ (Full disclosure--just found the article--I haven't tried the alternatives.)
@b0rk There used to be pman (symlink to the lynx-based info viewer pinfo) back in the day.
@b0rk what would fancy look like? There's a manpage browser in Emacs which IIRC does hyperlinking, but that is as fancy as I've seen it get
@zanchey Isn't that just GNU info? (Which is a shitty excuse for a hypertext system the FSF pushed for *decades* as a replacement for man pages and which was a huge regression in terms of standardized format and actual useful information.)
I used to work as part of the team maintaining the man pages for SCO UNIX, back in the 90s when Linux wasn't really a thing real people used (and SCO was a UNIX VAR, not a litigation zombie).
I consider my standards for man pages to be reasonable—but as a former technical author doing it as a full-time paid job to professional standards, I'm probably hoping for too much!
@cstross @lispi314 @zanchey Really? A small world. I was a 'Systems Engineer' for SCO's exclusive distributor in Canada at the start of the 90s. (Which mostly meant pre-sales support, teaching classes for new sysadmins, and consulting on thorny problems for bigger clients.) Did you attend any of their conferences at UC Santa Cruz?
@blakecoverett @lispi314 @zanchey No, i was in UK techpubs in Watford