shell: make detecting help option optional
Shell will not "steal" by default "-h" and "--help" each time help functions are enabled. This change is necessary to implement and use the getopt library. Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
parent
c2afabcc7c
commit
b64fb7c92d
4 changed files with 28 additions and 3 deletions
|
@ -662,8 +662,7 @@ static int execute(const struct shell *shell)
|
|||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_SHELL_HELP) && (cmd_lvl > 0) &&
|
||||
(!strcmp(argvp[0], "-h") ||
|
||||
!strcmp(argvp[0], "--help"))) {
|
||||
z_shell_help_request(argvp[0])) {
|
||||
/* Command called with help option so it makes no sense
|
||||
* to search deeper commands.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue