Argon: an alternative parser for command-line arguments

Jacob Carlborg via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Mar 4 04:21:25 PST 2016


On 2016-03-03 21:55, Markus Laker wrote:

> Yes.  You can give an option a description, like this:
>
> // ...
> uint nr_doors;
> // ...
> Named("doors", nr_doors, 0) ("number of doors").AddRange(1, 4);
>
> If you do this, the user has a nice, short name to type:
>
> --doors 2
>
> But the description will be used in error messages ("The number of doors
> must be between 1 and 4") and in auto-generated syntax summaries
> ("--doors <number of doors>").

No, I mean a longer description, more like documentation. Look at the 
help for git when using --help, it has different behavior than -h. The 
first one is more like a man page.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list