-
Notifications
You must be signed in to change notification settings - Fork 388
Description
Hi,
When a subcommand is set to configurable
CLI::App &security = *app.add_subcommand("security", "Security properties in config file");
security.add_option("ssl-certification-location", sslCertificationLocation, "ssl certification location");
security.configurable();
and has a section in the config toml
[security]
ssl-certification-location = "/etc/ssl/certs"
the help acts as if the user typed
cnpm --help security
#instead of
cnpm --help
when the App::_parse_single_config
is called and runs thru the toml and finds the [security]
section it push_back's the subcommand into parent_->parsed_subcommands_
at line https://github.com/CLIUtils/CLI11/blob/main/include/CLI/impl/App_inl.hpp#L1502. Then App::_process_help_flags
is called and it checks that parsed_subcommands_
is not empty at line https://github.com/CLIUtils/CLI11/blob/main/include/CLI/impl/App_inl.hpp#L1229. Any app programmed with a configured configurable subcommand never calls CallForHelp()
or CallForAllHelp()
.
Kinda of a dilemma. Could check if all in parsed_subcommands_
are configurable ones and go with the CallForHelp()
in that case yet the user might want to do
cnpm --help security
Maybe a property that says where it was parsed from?
?