Commit 082dbf0e6ea344bbef21aa76be2b071ee5796b29
Committed by
GitHub
1 parent
3897109e
Print help message for the last parsed subcommand (#822)
Co-authored-by: Philip Top <phlptp@gmail.com>
Showing
1 changed file
with
1 additions
and
1 deletions
include/CLI/impl/App_inl.hpp
| ... | ... | @@ -668,7 +668,7 @@ CLI11_NODISCARD CLI11_INLINE std::string App::help(std::string prev, AppFormatMo |
| 668 | 668 | // Delegate to subcommand if needed |
| 669 | 669 | auto selected_subcommands = get_subcommands(); |
| 670 | 670 | if(!selected_subcommands.empty()) { |
| 671 | - return selected_subcommands.at(0)->help(prev, mode); | |
| 671 | + return selected_subcommands.back()->help(prev, mode); | |
| 672 | 672 | } |
| 673 | 673 | return formatter_->make_help(this, prev, mode); |
| 674 | 674 | } | ... | ... |