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:
parent
3897109e51
commit
082dbf0e6e
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user