Argon: an alternative parser for command-line arguments
karabuta via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Sat Mar 5 08:28:25 PST 2016
On Friday, 4 March 2016 at 17:34:08 UTC, Markus Laker wrote:
> On Friday, 4 March 2016 at 12:21:25 UTC, Jacob Carlborg wrote:
>> 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.
>
> Ah, I see. Sorry for the misunderstanding.
>
> An app could do that trivially: have a --short-help option with
> shortcut -h and a --help option with no shortcut, and then
> respond to the two switches differently. Mark the --short-help
> option as undocumented, and then it won't appear in an
> auto-generated syntax summary.
>
> Markus
I think he meant: [git status --help], where you have three
attributes with the last one being the flag. So in addition to:
[status --help] by default, you also have: [git status --help] to
get help on status only.
By the way, that styles used by git seems confusing. Why not make
it show the default help when you do: [git --help], whilst you
can do: [git --help=status] OR [git --help status] for help on
status only?
git --help
git -h
git --help=status
git --help status
git -h=status
More information about the Digitalmars-d-announce
mailing list