Add a -h shortcup to abipkgdiff --help

* tools/abipkgdiff.cc (display_usage): Document the -h shortcut.
	(parse_command_line): Parse the -h shortcut to --help.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2015-08-13 17:19:59 +02:00
parent 242e49a321
commit da870f3598
2 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,7 @@ Invocation
Options
=======
* ``--help``
* ``--help | -h``
Display a short help about the command and exit.

View File

@ -369,7 +369,7 @@ display_usage(const string& prog_name, ostream& out)
<< " --no-added-syms do not display added functions or variables\n"
<< " --no-added-binaries do not display added binaries\n"
<< " --verbose emit verbose progress messages\n"
<< " --help display help message\n";
<< " --help|-h display help message\n";
}
/// Extract an RPM package.
@ -945,7 +945,8 @@ parse_command_line(int argc, char* argv[], options& opts)
opts.suppression_paths.push_back(argv[j]);
++i;
}
else if (!strcmp(argv[i], "--help"))
else if (!strcmp(argv[i], "--help")
|| !strcmp(argv[i], "-h"))
{
opts.display_usage = true;
return true;