From 290471cfda86d55a1caab890629c3263a7395ca6 Mon Sep 17 00:00:00 2001 From: Pavel Belikov Date: Tue, 12 Dec 2017 21:13:17 +0300 Subject: add Options::HiddenFromUsage and Options::HiddenFromDescription --- args.hxx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'args.hxx') diff --git a/args.hxx b/args.hxx index a8818ab..bcbc826 100644 --- a/args.hxx +++ b/args.hxx @@ -514,17 +514,25 @@ namespace args */ Required = 0x02, - /** Flag is excluded from help output. + /** Flag is excluded from usage line. */ - Hidden = 0x04, + HiddenFromUsage = 0x04, + + /** Flag is excluded from options help. + */ + HiddenFromDescription = 0x08, /** Flag is global and can be used in any subcommand. */ - Global = 0x08, + Global = 0x10, /** Flag stops a parser. */ - KickOut = 0x10, + KickOut = 0x20, + + /** Flag is excluded from options help and usage line + */ + Hidden = HiddenFromUsage | HiddenFromDescription, }; inline Options operator | (Options lhs, Options rhs) @@ -1350,7 +1358,7 @@ namespace args for (Base *child: Children()) { - if ((child->GetOptions() & Options::Hidden) != Options::None) + if ((child->GetOptions() & Options::HiddenFromDescription) != Options::None) { continue; } @@ -1371,7 +1379,7 @@ namespace args std::vector names; for (Base *child: Children()) { - if ((child->GetOptions() & Options::Hidden) != Options::None) + if ((child->GetOptions() & Options::HiddenFromUsage) != Options::None) { continue; } @@ -1900,7 +1908,7 @@ namespace args for (Base *child: Children()) { - if ((child->GetOptions() & Options::Hidden) != Options::None) + if ((child->GetOptions() & Options::HiddenFromDescription) != Options::None) { continue; } -- cgit v1.2.1