1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-01 05:03:52 +00:00

Print help message for the last parsed subcommand (#822)

Co-authored-by: Philip Top <phlptp@gmail.com>
This commit is contained in:
Volker Christian 2023-01-02 16:14:19 +01:00 committed by GitHub
parent 3897109e51
commit 082dbf0e6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -668,7 +668,7 @@ CLI11_NODISCARD CLI11_INLINE std::string App::help(std::string prev, AppFormatMo
// Delegate to subcommand if needed
auto selected_subcommands = get_subcommands();
if(!selected_subcommands.empty()) {
return selected_subcommands.at(0)->help(prev, mode);
return selected_subcommands.back()->help(prev, mode);
}
return formatter_->make_help(this, prev, mode);
}