Mark T. Tomczak<p>(Possibly relevant to <span class="h-card" translate="no"><a href="https://social.jvns.ca/@b0rk" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>b0rk</span></a></span> 's interests)</p><p>So I hit a flag in diff, <code>--unchanged-group-format</code>. 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.</p><p>You know where it shows up first? If you Google it, you'll get an example in <a href="https://www.gnu.org/software/diffutils/manual/html_node/Line-Group-Formats.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">gnu.org/software/diffutils/man</span><span class="invisible">ual/html_node/Line-Group-Formats.html</span></a>.</p><p>So why doesn't it show up in the manpage? Well, it does! If you read the entire manpage. With your eyes.</p><pre><code> -D, --ifdef=NAME output merged file with '#ifdef NAME' diffs <br> --GTYPE-group-format=GFMT format GTYPE input groups with GFMT <br> --line-format=LFMT format all input lines with LFMT <br> --LTYPE-line-format=LFMT format LTYPE input lines with LFMT <br> These format options provide fine-grained control over the output <br> of diff, generalizing -D/--ifdef. <br> LTYPE is 'old', 'new', or 'unchanged'. GTYPE is LTYPE or 'changed'. <br></code></pre><p>"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?"</p><p>This isn't advocating for <em>not</em> reading the manpage. If you really want to understand how the tool works, you read the whole manpage. And probably the source code. 😉 </p><p>... but I <em>don't</em> want to understand how the tool works. I want to diff two files and not have the lines that are the same get emitted.</p><p>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 <em>absolutely</em> go deep on some things. There is <em>no time</em> to go deep on everything.</p><p>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 <code>less</code> that could take an input like <code>--unchanged-group-format</code> and twig that it if there's no exact match, it <em>might</em> be related to <code>--GTYPE-group-format</code> would be nice.</p><p>Maybe I should mock that up in emacs. Actually, I bet someone already put it in emacs. ;)</p><p><a href="https://mastodon.fixermark.com/tags/emacs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>emacs</span></a> <a href="https://mastodon.fixermark.com/tags/manpage" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>manpage</span></a> <a href="https://mastodon.fixermark.com/tags/less" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>less</span></a></p>