diff options
| author | Wladimir J. van der Laan <[email protected]> | 2019-02-12 15:09:52 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2019-02-12 15:27:39 +0100 |
| commit | 65435701efdafc6b91db542327c57c69386f02eb (patch) | |
| tree | 508819bb668967e3f2f5cab197b572e292a69e9a /src/bitcoin-cli.cpp | |
| parent | Merge #15353: docs: Minor textual improvements in translation_strings_policy.md (diff) | |
| parent | util: Add SetupHelpOptions() (diff) | |
| download | discoin-65435701efdafc6b91db542327c57c69386f02eb.tar.xz discoin-65435701efdafc6b91db542327c57c69386f02eb.zip | |
Merge #15358: util: Add SetupHelpOptions()
a99999cc04c2e7d79bb841fd954c84e985ed3b88 util: Add SetupHelpOptions() (MarcoFalke)
Pull request description:
Every binary we have sets up the help option in their own way and wording.
Solve that by having one function take care of it for all of them.
Tree-SHA512: 6e947fa8bc2a46fa6ca9f45777020aa269a5df0dd916ebc863224f9a1e0f79e8e7754a1478567307edd9461e8babd77d26bc2710bbd56e8f8da9020aa85a8c9c
Diffstat (limited to 'src/bitcoin-cli.cpp')
| -rw-r--r-- | src/bitcoin-cli.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 7cdf61ad3..b0e1f67d9 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -34,11 +34,12 @@ static const int CONTINUE_EXECUTION=-1; static void SetupCliArgs() { + SetupHelpOptions(gArgs); + const auto defaultBaseParams = CreateBaseChainParams(CBaseChainParams::MAIN); const auto testnetBaseParams = CreateBaseChainParams(CBaseChainParams::TESTNET); const auto regtestBaseParams = CreateBaseChainParams(CBaseChainParams::REGTEST); - gArgs.AddArg("-?", "This help message", false, OptionsCategory::OPTIONS); gArgs.AddArg("-version", "Print version and exit", false, OptionsCategory::OPTIONS); gArgs.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), false, OptionsCategory::OPTIONS); gArgs.AddArg("-datadir=<dir>", "Specify data directory", false, OptionsCategory::OPTIONS); @@ -55,10 +56,6 @@ static void SetupCliArgs() gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to bitcoind). This changes the RPC endpoint used, e.g. http://127.0.0.1:8332/wallet/<walletname>", false, OptionsCategory::OPTIONS); gArgs.AddArg("-stdin", "Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases). When combined with -stdinrpcpass, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS); gArgs.AddArg("-stdinrpcpass", "Read RPC password from standard input as a single line. When combined with -stdin, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS); - - // Hidden - gArgs.AddArg("-h", "", false, OptionsCategory::HIDDEN); - gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN); } /** libevent event log callback */ |