mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,4 Tsd.
aktive Profile

#manpage

1 Beitrag1 Beteiligte*r0 Beiträge heute
Fortgeführter Thread

Today this bugged me enough to investigate it again, and it's actually a confirmed bug in the `man` command! 😂

gitlab.com/man-db/man-db/-/iss

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`. 💁‍♂️

GitLab$LANGUAGE priority ignored (#40) · Issues · man-db / man-db · GitLabHere is my setup for context: unset LC_ALL;
#Linux#CLI#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 gnu.org/software/diffutils/man.

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. ;)

www.gnu.orgLine Group Formats (Comparing and Merging Files)Line Group Formats (Comparing and Merging Files)
#ifdef#emacs#manpage

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.

suburbanalities.blogspot.com/2

suburbanalities.blogspot.comAdding color to man pages
#ManPage#Linux#Terminal
Antwortete im Thread

@mboelen

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>

@altbot

🖋️ #bash #sh #zsh #ksh #csh #qBittorrent #torrent #manpage #man1 #F1 #F1Help #WomenWhoCode #640daysofcode #301daysofcode #730daysofcode #100DaysOfCode #1000DaysOfCode #Linux #POSIX #Programming #DEVCommunity

github.com/qbittorrent/qBittor

It just came to my mind that another thing should probably go on the V1.0 roadmap for #Xmoji: A #manpage. But then, this reminds me of doubts I had ever so often: #Documentation should have a single source of truth (otherwise it will go out of sync eventually).

I could just declare that's the manpage now, which would mean to remove everything I put there from the 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. 😞 There's the additional problem of which markup flavor to choose: the modern 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".

There are also many "document generators" around that typically allow output as 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.

Great ideas anyone? 😁
Antwortete im Thread

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.