Add -version option to get just the version
Adds a `-version` or `--version` option to print just the version of the program for bitcoind, bitcoin-cli and bitcoin-qt. Also make it that `-help` can be used to display the help (as well as existing `--help`). Up to now, `-help` was the only option that didn't work with either one or two dashes.
This commit is contained in:
@@ -503,9 +503,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
|
||||
// but before showing splash screen.
|
||||
if (mapArgs.count("-?") || mapArgs.count("--help"))
|
||||
if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
|
||||
{
|
||||
HelpMessageDialog help(NULL);
|
||||
HelpMessageDialog help(NULL, mapArgs.count("-version"));
|
||||
help.showOrPrint();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user