aboutsummaryrefslogtreecommitdiff
path: root/args.hxx
diff options
context:
space:
mode:
authorPavel Belikov <pavel.fuchs.belikov@gmail.com>2017-11-09 21:31:58 +0300
committerPavel Belikov <pavel.fuchs.belikov@gmail.com>2017-11-09 21:31:58 +0300
commit34d613b02b69fdb1c66eb61184c6f660d98ff95d (patch)
treee28b72f3d9db0ce7d490650598d24b9422cdb7ee /args.hxx
parentadd documentation for Command::RequireCommand (diff)
downloadargs.hxx-34d613b02b69fdb1c66eb61184c6f660d98ff95d.tar.xz
change default value of RequireCommand
Diffstat (limited to 'args.hxx')
-rw-r--r--args.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/args.hxx b/args.hxx
index 21dd433..6ec4ab0 100644
--- a/args.hxx
+++ b/args.hxx
@@ -1261,7 +1261,7 @@ namespace args
std::string proglinePostfix;
std::function<void(Subparser&)> parserCoroutine;
- bool commandIsRequired = false;
+ bool commandIsRequired = true;
Command *selectedCommand = nullptr;
mutable std::vector<std::tuple<std::string, std::string, unsigned>> subparserDescription;
@@ -1375,6 +1375,8 @@ namespace args
{ return help; }
/** If value is true, parser will fail if no command was parsed.
+ *
+ * Default: true.
*/
void RequireCommand(bool value)
{ commandIsRequired = value; }