aboutsummaryrefslogtreecommitdiff
path: root/src/util/system.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-02-12 15:09:52 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-02-12 15:27:39 +0100
commit65435701efdafc6b91db542327c57c69386f02eb (patch)
tree508819bb668967e3f2f5cab197b572e292a69e9a /src/util/system.cpp
parent1bc149d05b09d716723d2f091250fab38fd70fc2 (diff)
parenta99999cc04c2e7d79bb841fd954c84e985ed3b88 (diff)
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/util/system.cpp')
-rw-r--r--src/util/system.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index bb9fcab59e..27ed24d012 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -635,6 +635,12 @@ bool HelpRequested(const ArgsManager& args)
return args.IsArgSet("-?") || args.IsArgSet("-h") || args.IsArgSet("-help") || args.IsArgSet("-help-debug");
}
+void SetupHelpOptions(ArgsManager& args)
+{
+ args.AddArg("-?", "Print this help message and exit", false, OptionsCategory::OPTIONS);
+ args.AddHiddenArgs({"-h", "-help"});
+}
+
static const int screenWidth = 79;
static const int optIndent = 2;
static const int msgIndent = 7;