http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=405108: NAK...

Denys Vlasenko vda.linux at googlemail.com
Sat Jul 12 17:19:56 UTC 2008


>From: Joey Hess <joeyh at debian.org>
>My version:
>TAB="	"
>busybox --help | grep -A 100 'Currently defined functions' | \
>           tail -n +2 | grep "^$TAB" | sed 's/,/ /g'
>> Currently to get a list of the supported commands in busybox I need to use
>> the above shell code.  This is ugly and will cause problems if the number of
>> lines required changes.
>> 
>> What we need is a --list command-line option that will display all supported
>> options one per line to stdout without any additional commentary.
>
>Seconded.

I feel I'm not too crazy about code size, so I'm trying to imagine
how the founders of the project might think. And I think they
wouldn't like this.

If one line of shell script can do it:

busybox | grep -A 100 'Currently defined functions' | { read junk; xargs | sed -e 's/,/ /g' -e 's/   */ /g'; }

(this version doesnt require TAB tricks, it's all plain ASCII)

then busybox don't need it. We are supposed to be -Os minded people,
and we should be resisting adding more switches just because
it's vaguely useful.
--
vda



More information about the busybox mailing list