bin: add --usage back
Because it appears in some error messages we cannot remove. Make --usage as a synonym for --help. * bin/common_setup.cc: Here.
This commit is contained in:
parent
af3f62c1c8
commit
7b580e006a
1 changed files with 6 additions and 0 deletions
|
|
@ -130,6 +130,9 @@ static const argp_option options[] =
|
|||
{
|
||||
{ "version", OPT_VERSION, nullptr, 0, "print program version", -1 },
|
||||
{ "help", OPT_HELP, nullptr, 0, "print this help", -1 },
|
||||
// We support --usage as a synonym for --help because argp's
|
||||
// hardcoded error message for unknown options mentions it.
|
||||
{ "usage", OPT_HELP, nullptr, OPTION_HIDDEN, nullptr, -1 },
|
||||
{ nullptr, 0, nullptr, 0, nullptr, 0 }
|
||||
};
|
||||
|
||||
|
|
@ -138,6 +141,9 @@ static const argp_option options_hidden[] =
|
|||
{ "version", OPT_VERSION, nullptr, OPTION_HIDDEN,
|
||||
"print program version", -1 },
|
||||
{ "help", OPT_HELP, nullptr, OPTION_HIDDEN, "print this help", -1 },
|
||||
// We support --usage as a synonym for --help because argp's
|
||||
// hardcoded error message for unknown options mentions it.
|
||||
{ "usage", OPT_HELP, nullptr, OPTION_HIDDEN, nullptr, -1 },
|
||||
{ nullptr, 0, nullptr, 0, nullptr, 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue