monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] overwriteable and negatable options


From: Thomas Keller
Subject: Re: [Monotone-devel] overwriteable and negatable options
Date: Mon, 21 Jun 2010 08:48:36 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4-1.1.1 Lightning/1.0b2pre Thunderbird/3.0.4

Am 21.06.2010 06:12, schrieb Timothy Brownawell:
> On 06/14/2010 05:00 AM, Stephen Leake wrote:
>> Would it be possible to specify the reset option name in the OPTSET
>> macro? That would be clearer. Each optset has a full options_type entry
>> in all_options, so the resetter could be stored there, rather than with
>> each individual option.
> 
> Really, the current setup was based entirely on it being obvious and
> simple to translate to --help output. And it ends up with the help
> output being exactly as unclear as what's in options_list.hh .
> 
> Right now it looks like [0]
> 
>   --date-format <arg> / --default-date-format     ...text...
>   --key [ -k ] <arg> / --use-default-key          ...text...
>   --no-format-dates                               ...text...
> 
> Other possibilities would be [1]
> 
>   Date formatting options
>     --date-format <arg>                           ...text...
>     --no-format-dates                             ...text...
>     --default-date-format                         ...text...
>   Key options
>     --key [ -k ] <arg>                            ...text...
>     --use-default-key                             ...text...
> 
> or [2]
> 
>   Date formatting options (reset with --default-date-format)
>     --date-format <arg>                           ...text...
>     --no-format-dates                             ...text...
>   Key options (reset with --use-default-key)
>     --key [ -k ] <arg>                            ...text...
> 
> or possibly treating groups with a single options specially, as [3]
> 
>   Date formatting options
>     --date-format <arg>                           ...text...
>     --no-format-dates                             ...text...
>     --default-date-format                         ...text...
>   --key [ -k ] <arg> / --use-default-key          ...text...
> 
> or [4]
> 
>   Date formatting options (reset with --default-date-format)
>     --date-format <arg>                           ...text...
>     --no-format-dates                             ...text...
>   --key [ -k ] <arg> / --use-default-key          ...text...
> 
> I think I prefer [2] over [1], and [3] and [4] could be slightly
> confusing due to inconsistency. [2] and [4] would make the resetter not
> take a description, while [1] would make it have a description. [3]
> would be problematic, and the resetter would need a description in some
> cases (multiple setter flags in that optset) but not in others.
> 
> Thoughts?

I guess we have to see how this looks in the final output. I fear that
we might put in a lot of line noise for simple things and I would
therefor pick whatever seems to be the shortest possible output. For
example I've seen software in the past which grouped similar options
just by indenting them one or two spaces from the rest... and I don't
think that this is such a bad idea, given the fact that most of our
options are already really chatty.

Also, during the evolution of this branch it was encountered that a
simple "[no-]" prefix might not always be (orthographically) suitable,
but we haven't yet talked about whether these custom strings are easy to
memorize for users. Anyways, for these simple kind of options it would
be cool to see them as

   --[no-]flag          ...text...

and not

   --flag / --no-flag    ...text...

but I haven't looked at the code recently, thus I don't know how many of
these kind of options we still have now... guess I have to play around
with it a bit today.

Thomas.

-- 
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]