Skip to content

Commit 3cb56f3

Browse files
committed
*: alias -h for --help
1 parent d78a880 commit 3cb56f3

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static bool AppInitRPC(int argc, char* argv[])
6969
// Parameters
7070
//
7171
ParseParameters(argc, argv);
72-
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) {
72+
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) {
7373
std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
7474
if (!mapArgs.count("-version")) {
7575
strUsage += "\n" + _("Usage:") + "\n" +

src/bitcoin-tx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static bool AppInitRawTx(int argc, char* argv[])
4242

4343
fCreateBlank = GetBoolArg("-create", false);
4444

45-
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help"))
45+
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help"))
4646
{
4747
// First part of help message is specific to this utility
4848
std::string strUsage = _("Bitcoin Core bitcoin-tx utility version") + " " + FormatFullVersion() + "\n\n" +

src/bitcoind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ bool AppInit(int argc, char* argv[])
7272
ParseParameters(argc, argv);
7373

7474
// Process help and version before taking care about datadir
75-
if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
75+
if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version"))
7676
{
7777
std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
7878

src/qt/bitcoin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ int main(int argc, char *argv[])
563563

564564
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
565565
// but before showing splash screen.
566-
if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
566+
if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version"))
567567
{
568568
HelpMessageDialog help(NULL, mapArgs.count("-version"));
569569
help.showOrPrint();

0 commit comments

Comments
 (0)