aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor C. Richberger <Taywee@gmx.com>2016-05-10 16:06:15 -0600
committerTaylor C. Richberger <Taywee@gmx.com>2016-05-10 16:06:15 -0600
commitf3a2486f06c9e8e0604f85bf78b93ef1eb76e947 (patch)
tree7b0beefd987571fb1de69095be630d5e514d48e1
parentbump version to 3.0.2 (diff)
downloadargs.hxx-f3a2486f06c9e8e0604f85bf78b93ef1eb76e947.tar.xz
make terminator showing optional3.0.3
-rw-r--r--Doxyfile2
-rw-r--r--args.hxx6
2 files changed, 6 insertions, 2 deletions
diff --git a/Doxyfile b/Doxyfile
index 6e3909e..e796441 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NAME = "args"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 3.0.2
+PROJECT_NUMBER = 3.0.3
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/args.hxx b/args.hxx
index 752dc7b..0b88924 100644
--- a/args.hxx
+++ b/args.hxx
@@ -810,6 +810,10 @@ namespace args
/** The minimum gutter between each flag and its help
*/
unsigned int gutter = 1;
+
+ /** Show the terminator when both options and positional parameters are present
+ */
+ bool showTerminator = true;
} helpParams;
ArgumentParser(const std::string &description, const std::string &epilog = std::string()) :
Group("arguments", Group::Validators::AllChildGroups),
@@ -1002,7 +1006,7 @@ namespace args
help << std::string(groupindent + helpParams.helpindent, ' ') << *infoit << '\n';
}
}
- if (hasoptions && hasarguments)
+ if (hasoptions && hasarguments && helpParams.showTerminator)
{
for (const std::string &item: Wrap(std::string("\"") + terminator + "\" can be used to terminate flag options and force all following arguments to be treated as positional options", helpParams.width - helpParams.flagindent))
{