long / short options (was Re: start-stop-daemon does not recognise --start)
Ralf Friedl
Ralf.Friedl at online.de
Thu Oct 18 17:41:04 UTC 2007
Denys Vlasenko wrote:
> Try this patch.
> ...
Do you think it would be useful to define something like this:
#define OPTION_HELP_TEXT(SHORT, LONG, TEXT) SHORT
USE_FEATURE_LONG_OPTIONS(LONG) TEXT
Then the options could be written as
OPTION_HELP_TEXT(" -v", ", --verbose", " Verbose\n")
and the middle Part could be included/excluded as necessary. That would
avoid duplicating the description for the "long option" / "no long
option" cases and make it easier to maintain.
Regards
Ralf Friedl
More information about the busybox
mailing list