From f3a2486f06c9e8e0604f85bf78b93ef1eb76e947 Mon Sep 17 00:00:00 2001 From: "Taylor C. Richberger" Date: Tue, 10 May 2016 16:06:15 -0600 Subject: make terminator showing optional --- args.hxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'args.hxx') 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)) { -- cgit v1.2.1