[PATCH] show value requirement and multiple occurrence of option in online help

Greg Ward greg-hg at gerg.ca
Mon Jun 7 08:33:41 CDT 2010


On Sun, Jun 6, 2010 at 4:26 AM, FUJIWARA Katsunori
<fujiwara at ascade.co.jp> wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1275812700 -32400
> # Node ID cd639cbaf42f509836852b2d59fd14f4ff08db9c
> # Parent  0e5ce2325795325e41f6df9203373d2858e88f88
> show value requirement and multiple occurrence of option in online help
>
> this helps users to know what kind of option is:
>
>  - no value is required(flag option)
>  - value is required
>  - value is required, and multiple occurrences are allowed

Excellent!  This is a good idea and will definitely improve
command-line usability.

But I'm not sure that it's worth the trouble of formally denoting
options that allow multiple occurrences.  I prefer to do this
informally in the help text.  E.g. I think

  -b --branch BRANCH [+]  a specific branch you would like to push

would be clearer as

  -b --branch BRANCH    a specific branch you would like to push
(repeat to push multiple branches)

IMHO it's not *that* common that it requires a formal notation, and
the formal notation is novel and unfamiliar.

I looked briefly at your actual patch, and it feels sensible to me.

Greg


More information about the Mercurial-devel mailing list