i feel like i've probably asked this before but has anyone written a fancy command line man page viewer to replace `man`?
-
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 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...
-
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 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 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)
-
@b0rk (now I know the answer)
@literatesavant what's the answer?
-
@doekman it's so nice! my dream is that somehow someone has made something like that for the terminal
@b0rk It is, right? FWIW: sometimes I use this function to open a man-page: it opens a new terminal window.
function yman() { open "x-man-page://$1" ; }
-
@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 commandsSo 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 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 commandsSo 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 if you don't specify a level, the default search order is 1, 8, 2-7.
-
@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#whyThen 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-243173849It'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
-
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`.
-
@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#whyThen 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-243173849It'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
galiased togit, and that's only 3 letters -
@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.
@rjbs @b0rk the BSD -mdoc macros are much nicer than the old -man macros: mdoc has rich semantic markup and some basic support for hyperlinks
mdoc is fairly nice to edit despite the dot-line commands and the terse two-letter abbreviations
and the mandoc utilities do a beautiful job of turning mdoc man pages to html
i wonder how well mandoc -Thtml | w3m works compared to the old w3mman wrapper…
-
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 because sometimes you just want a simple reading experience:
man -t $1 | open -f -a /Applications/Preview.app
-
@b0rk because sometimes you just want a simple reading experience:
man -t $1 | open -f -a /Applications/Preview.app
@wookieeboy whoa Preview has a man page reader?? I can't get it to work but that's interesting
-
@wookieeboy whoa Preview has a man page reader?? I can't get it to work but that's interesting
@b0rk preview can open postscript files. I haven’t used that in a while. It used to be that -t on man would generate postscript for printing.
-
@b0rk preview can open postscript files. I haven’t used that in a while. It used to be that -t on man would generate postscript for printing.
@wookieeboy thanks! I do get a postscript file but for some reason Preview won't open it, who knows why
-
@wookieeboy thanks! I do get a postscript file but for some reason Preview won't open it, who knows why
@b0rk I'm starting to think that Preview doesn't like to open postscript any more. Even a more verbose version fails to open
man -t sudo > /tmp/sudo.ps && open -a "Preview" /tmp/sudo.ps
-
@b0rk I'm starting to think that Preview doesn't like to open postscript any more. Even a more verbose version fails to open
man -t sudo > /tmp/sudo.ps && open -a "Preview" /tmp/sudo.ps
@b0rk Now I'm a little bit sad.
-
@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.