shell: add getopt library support
This functionality is is enabled by setting CONFIG_SHELL_GETOPT. It is not active by default. User can call following functions inside command handlers: - shell_getopt - getopt function based on freebsd implementation - shell_getopt_status_get - returns getopt status Beware when getopt functionality is enabled shell will not parse command handler to look for "-h" or "--help" options and print help message automatically. Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
parent
74ebf5dba2
commit
7e46765153
6 changed files with 124 additions and 1 deletions
|
@ -109,6 +109,12 @@ config SHELL_VT100_COLORS
|
|||
help
|
||||
If enabled VT100 colors are used in shell (e.g. print errors in red).
|
||||
|
||||
config SHELL_GETOPT
|
||||
bool "Enable getopt support"
|
||||
select GETOPT
|
||||
help
|
||||
Enables getopt support in the shell.
|
||||
|
||||
config SHELL_METAKEYS
|
||||
bool "Enable metakeys"
|
||||
default y if !SHELL_MINIMAL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue