From 0d074ec64a5c818ba7b60eacd77ea1611dbd5171 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Tue, 15 Aug 2023 11:18:03 +0100 Subject: [PATCH] command_line/options: Completed implementing automatic options_t help for optionSet_t's --- impl/command_line/options.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/impl/command_line/options.cxx b/impl/command_line/options.cxx index 53f22760..6b92cf6e 100644 --- a/impl/command_line/options.cxx +++ b/impl/command_line/options.cxx @@ -236,7 +236,7 @@ namespace substrate::commandLine void optionsHolder_t::displayHelp() const noexcept { // Figure out how much padding is needed to make everything neat - const auto padding{displayPadding() + 1U}; + const auto padding{displayPadding()}; std::vector optionSets{}; // Now display the non-alternation options and collect option sets @@ -249,6 +249,10 @@ namespace substrate::commandLine [&](const optionSet_t &value) { optionSets.emplace_back(value); }, }, option); } + + // Now go through each option alternation set and display those + for (const auto &optionSet : optionSets) + optionSet.displayHelp(padding); } } // namespace internal } // namespace substrate::commandLine