Discussion:
[Toybox] [PATCH] Clean up some --help formatting.
Rob Landley
2018-12-04 23:06:04 UTC
Permalink
Be consistent about upper versus lower case. (Upper seems to have the
majority, so I went with that, though I'm happy to provide the opposite
patch as long as we're consistent!)
Be consistent about using \t. (Though saving a few bytes seems like it
might be better done in the code that generates help.h rather than
directly in the source, since tabs make careful ASCII art layout hard
enough that we regularly have things misaligned.)
My todo item here is when I get deflate properly merged into lib and gzip
promoted, I should have the option to compress the help text and do a "zcat |
cut" thing inside help.c to go "output the 17th null terminated string".

(I vaguely recall busybox did something like back when I was on that project, I
just haven't had a compression engine in the build yet.)

Won't help standalone builds, but it does help the "common case" of one big
binary you fit in an initramfs. And that should make "run of spaces" vs "tabs"
be basically a wash.

Rob
Rob Landley
2018-12-04 23:10:43 UTC
Permalink
since rob's so responsive right now, this seems like the best
opportunity there's ever been to stop the --help output irritating my
OCD on a daily basis!
i did choose to just ignore everything in pending for now, though.
I'm in the process of doing the FLAG() conversion, and git isn't smart enough
for "git am" to know what to do wit the patch applies without conflict. The file
has to be _unmodified_. Grumble.

Sigh: git diff > xxx; git checkout -f; git am thingy.patch; patch -p1 -i xxx

And I have to fix up su.c and cpio.c here, but your patch is in.

Rob

Continue reading on narkive:
Loading...