
Today this bugged me enough to investigate it again, and it's actually a confirmed bug in the `man` command!
https://gitlab.com/man-db/man-db/-/issues/40
As far as I understand it, English man pages are special since they're not in a subdirectory:
/usr/share/man/man1/tac.1.gz
—vs—
/usr/share/man/de/man1/tac.1.gz
And somehow man's language handling doesn't consider them at all when also finding a page in the $LANGUAGE list.
Workaround: Unset $LANGUAGE when invoking `man`.
(Possibly relevant to @b0rk 's interests)
So I hit a flag in diff, --unchanged-group-format
. It does not show up in the manpage. It does not show up in --help. You can search both those channels for that string and you will not find it.
You know where it shows up first? If you Google it, you'll get an example in https://www.gnu.org/software/diffutils/manual/html_node/Line-Group-Formats.html.
So why doesn't it show up in the manpage? Well, it does! If you read the entire manpage. With your eyes.
-D, --ifdef=NAME output merged file with '#ifdef NAME' diffs
--GTYPE-group-format=GFMT format GTYPE input groups with GFMT
--line-format=LFMT format all input lines with LFMT
--LTYPE-line-format=LFMT format LTYPE input lines with LFMT
These format options provide fine-grained control over the output
of diff, generalizing -D/--ifdef.
LTYPE is 'old', 'new', or 'unchanged'. GTYPE is LTYPE or 'changed'.
"What do you mean it isn't documented? Of course it's documented. You did read every line and do some template-substitution in your brain, didn't you?"
This isn't advocating for not reading the manpage. If you really want to understand how the tool works, you read the whole manpage. And probably the source code.
... but I don't want to understand how the tool works. I want to diff two files and not have the lines that are the same get emitted.
And I think a lot of application- and solution-generating computer people, most of the time, in most of their careers, are operating on that level of depth. Problems come in too fast and with too much variety. You absolutely go deep on some things. There is no time to go deep on everything.
So how do we address this (other than throw up our hands and say "Relying on Google's fuzzy search of the whole Internet and vibe-coding LLMs is the future actually")? I don't have magic bullets, but a "fuzzy search" mode in something like less
that could take an input like --unchanged-group-format
and twig that it if there's no exact match, it might be related to --GTYPE-group-format
would be nice.
Maybe I should mock that up in emacs. Actually, I bet someone already put it in emacs. ;)
Another "Tech notes to myself" blog post: Adding color to man pages
I'm still trying to figure out a decent workflow of getting my MarkDown documents converted over to HTML and getting them to render decently. I feel like I may be struggling with publishing to Blogspot than I need to be. Or, I just need more practice.
https://suburbanalities.blogspot.com/2025/02/adding-color-to-man-pages.html
Wow Michael, wat een werk en wat een boel nuttige info! Rustig uitgelegd en helder verwoord.
Ik heb zelfs geleerd dat alle package managers TODO heten
Maar alle gekheid op een stokkie, kudo's voor al je werk! Ik ga er zeker zelf nog van leren en zeker naar verwijzen bij mijn geïnteresseerde leerlingen!
When I need docs I do
`man command'
When I pressed F1 in a gui program it did the following
* Request a helper running in my DE to parse a html page
* Ask the helper to open my default html parser
* __Without asking me__ the helper opened a __massive browser__ ravaging ram just to show me what I could find with
`man command`
* I wonder why instead the Ui program did not do the following
* request a helper open a (ba)sh
* parse >man command to the helper
* have the helper display the manpage in the sh
The results would be
* Much less resources used
* No assumption on my current internet connection would be made
* That method has worked for 60 years
<IRC>
/m shakes head and looks at the massive browser showing the equivalence of a manpage
</IRC>
#bash #sh #zsh #ksh #csh #qBittorrent #torrent #manpage #man1 #F1 #F1Help #WomenWhoCode #640daysofcode #301daysofcode #730daysofcode #100DaysOfCode #1000DaysOfCode #Linux #POSIX #Programming #DEVCommunity
https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions
Please put examples in your #manpage.
It tells more then words.
I've learned something wonderfull again from my POSIX OS workstation.
I was looking for 7zip and did not bother to type 7z then tab. I was so delighted the name is **just** 7z. Of course Im reading the man page!
#bash #man #manpage #7z #sh #zsh #ksh #csh #sockets #freeBSD #netBSD #openBSD #Linux #POSIX
On this day in 1971 the first edition of the Unix Programmer's Manual was published, with the first man pages.
Specifics Bob! Specifics!
https://linux.die.net/man/1/nice:
"Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)"
Hmm, is it favoring the system or the specified process?
`man nice`:
"Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process)."
Got it
README.md
. Not ideal though, this markdown file is accessible for direct reading on github (and would be on other "hosted git" solutions), while it's still well readable as plain text. This certainly isn't true for some roff-like markup. mandoc
(which is native on #FreeBSD), or the classic troff man
macro package (which still seems "native" in #GNU's man-db)... Modern installations support both flavors, but conversions aren't "perfect".html
, pdf
, man
, ... but I didn't find one so far that really gave satisfactory results for man. A while ago, I wrote my own tool which can generate #C source for "help" output, man
(in both flavors) and html
, and this worked pretty nicely, but the key was a very limited scope, it only supports a few sections (general description, options, environment variables) and only options in the classic #POSIX style (single letter, collapsible). So, it wouldn't fit the bill for Xmoji.How To Efficiently Search Linux Manual Pages with the man -k Command #Linux #Manualpages #Manpage #Linuxcommands #Linuxbasics #Linuxtips
https://ostechnix.com/search-linux-manual-pages/
Today, after reading the #udev #manpage and some other references I managed to write a udev rule to automatically unbind the USB interface of the keyboard, the one used to program it.
It was an interesting challenge because the keyboard has multiple interfaces under the same #USB vendor and product IDs and I only wanted to touch that specific interface.
There's something not quite right yet for my objective of manking my #8bdkbd utility able to run rootless though. Will keep experimenting later.