[Toybox] interesting new (?) env(1) options

Oliver Webb aquahobbyist at proton.me
Fri Mar 15 16:26:22 PDT 2024


> But that doesn't become part of the help text (maybe it should?) and doesn't
> cover multiple commands in the same source file. And xzcat.c does it wrong.

We could just fix xzcat then with a one line patch if it's the only thing that breaks the norm.

> Anyway: if a "toybox cheat sheet" seems like a good thing, we're like 80% of the
> way there already?

It would give us a free "apropos" command. I don't see why not if the process of changing
the infrastructure for it is trivial. We would have to separate help text from apropos
text though.

We could just use the first line after the usage for apropos text, it wouldn't require
2 separate arrays which only one is used for by "help" and "apropos" (and maybe a --apropos
option if we want one). Executable size would be a lot smaller too.

Also, how would you feel about autogenerating troff "-man" macros the same way we do html
to give us a man page of concatenated help text like busybox has? Ubuntu has a package for
toybox that generates a man page using "GNU help2man" A horrible perl script that tries to
jam a reference to info pages into everything by DEFAULT and you have to tell it not to
if you don't want:

       The full documentation for toybox is maintained as a Texinfo manual. If 
       the info and toybox programs are properly installed at your site, the 
       command

              info toybox

       should give you access to the complete manual.

In your man page. Because info conquered the world the same way hurd did.

-   Oliver Webb <aquahobbyist at proton.me>


More information about the Toybox mailing list