shell: help functions update

Functions shell_help_subcmd_print and shell_help_cmd_print
are more generic. Now they can operate on command passed as an
argument not hard coded active_cmd.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
This commit is contained in:
Jakub Rzeszutko 2020-10-01 10:38:00 +02:00 committed by Anas Nashif
commit 137b7ec5bd
3 changed files with 24 additions and 17 deletions

View file

@ -49,8 +49,9 @@ static void shell_internal_help_print(const struct shell *shell)
return;
}
shell_help_cmd_print(shell);
shell_help_subcmd_print(shell);
shell_help_cmd_print(shell, &shell->ctx->active_cmd);
shell_help_subcmd_print(shell, &shell->ctx->active_cmd,
"Subcommands:\n");
}
/**