shell: add select command
The "select" command has been implemented, which allows user to narrow down the command tree. This implementation differs from the "select" command available in the legacy shell. In a new implementation, if the selected command has a handler and if the user has not entered the registered subcommand, the shell will call the handler of selected command and pass the text as arguments. This may be useful, for example, if someone wants to use the shell as an interface to a modem that supports AT commands. Instead of each time you write e.g: at at+command1 at at+command2 at at+command3 user can execute following commands: select at at+command1 at+command2 at+command3 where: at - root command for passing at commands to the modem at+commandX - at command passed to the modem. Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
parent
fde86da6f5
commit
b633e431a4
8 changed files with 227 additions and 96 deletions
|
@ -22,6 +22,7 @@
|
|||
#define SHELL_VT100_ASCII_CTRL_W (0x17)
|
||||
#define SHELL_VT100_ASCII_ALT_B (0x62)
|
||||
#define SHELL_VT100_ASCII_ALT_F (0x66)
|
||||
#define SHELL_VT100_ASCII_ALT_R (0x72)
|
||||
|
||||
#define SHELL_VT100_SETNL \
|
||||
{ \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue