shell: optionally set shell root command using Kconfig

If the shell root command shall be set in the application, e.g. for
implementing a login scheme, it is an advantage to set this already
during shell init.

This is now implemented using a new Kconfig variable SHELL_CMD_ROOT.

Signed-off-by: Hans Wilmers <hans@wilmers.no>
This commit is contained in:
Hans Wilmers 2021-06-11 16:19:03 +02:00 committed by Carles Cufí
commit 414603fc9c
4 changed files with 24 additions and 6 deletions

View file

@ -203,6 +203,12 @@ config SHELL_CMDS_SELECT
This option enables select command. It can be used to set new root
command. Exit to main command tree is with alt+r.
config SHELL_CMD_ROOT
string "Set a root command at init"
help
This option sets a root command at shell init,
and when exiting to main command tree with alt+r.
config SHELL_LOG_BACKEND
bool "Enable shell log backend"
depends on LOG && !LOG_MINIMAL