Skip to content

Commit 33a28e2

Browse files
committed
Change default help arg to -help and mention -h and -? as alternatives
% build/src/bench/bench_bitcoin -h [...] -help Print this help message and exit (also -h or -?)
1 parent f0130ab commit 33a28e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/common/args.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,8 @@ bool HelpRequested(const ArgsManager& args)
688688

689689
void SetupHelpOptions(ArgsManager& args)
690690
{
691-
args.AddArg("-?", "Print this help message and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
692-
args.AddHiddenArgs({"-h", "-help"});
691+
args.AddArg("-help", "Print this help message and exit (also -h or -?)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
692+
args.AddHiddenArgs({"-h", "-?"});
693693
}
694694

695695
static const int screenWidth = 79;

test/lint/check-doc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
CMD_GREP_WALLET_HIDDEN_ARGS = r"git grep --function-context 'void DummyWalletInit::AddWalletOptions' -- {}".format(CMD_ROOT_DIR)
2424
CMD_GREP_DOCS = r"git grep --perl-regexp '{}' {}".format(REGEX_DOC, CMD_ROOT_DIR)
2525
# list unsupported, deprecated and duplicate args as they need no documentation
26-
SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb'])
26+
SET_DOC_OPTIONAL = set(['-h', '-?', '-dbcrashratio', '-forcecompactdb'])
2727

2828

2929
def lint_missing_argument_documentation():

0 commit comments

Comments
 (0)