[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: long / short options (was Re: start-stop-daemon does not
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2007-10-18 21:00:53
Message-ID: 200710182200.53525.vda.linux () googlemail ! com
[Download RAW message or body]

On Thursday 18 October 2007 18:41, Ralf Friedl wrote:
> 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.

Unfortunately, this will mess up alignment of text
explaining what each option does, as it depends on exact count
of bytes in options. Otherwise alignment by tabs often breaks.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic