2019-11-01 20:45:29 +08:00
|
|
|
# Shell configuration options
|
2016-12-24 03:06:46 +08:00
|
|
|
|
|
|
|
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
|
|
|
# Copyright (c) 2016 Intel Corporation
|
2018-11-27 19:11:04 +08:00
|
|
|
# Copyright (c) 2018 Nordic Semiconductor ASA
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-12-24 03:06:46 +08:00
|
|
|
|
2018-08-09 17:57:31 +08:00
|
|
|
menuconfig SHELL
|
2019-04-09 20:14:58 +08:00
|
|
|
bool "Shell"
|
2019-03-21 22:58:03 +08:00
|
|
|
imply LOG_RUNTIME_FILTERING
|
2018-08-09 15:56:10 +08:00
|
|
|
select POLL
|
|
|
|
|
|
|
|
if SHELL
|
|
|
|
|
|
|
|
module = SHELL
|
|
|
|
module-str = Shell
|
|
|
|
source "subsys/logging/Kconfig.template.log_config"
|
2018-10-04 21:17:00 +08:00
|
|
|
source "subsys/shell/Kconfig.backends"
|
2018-08-09 15:56:10 +08:00
|
|
|
|
|
|
|
config SHELL_STACK_SIZE
|
|
|
|
int "Shell thread stack size"
|
2018-08-09 17:57:31 +08:00
|
|
|
default 2048 if MULTITHREADING
|
2018-08-09 15:56:10 +08:00
|
|
|
default 0 if !MULTITHREADING
|
|
|
|
help
|
|
|
|
Stack size for thread created for each instance.
|
|
|
|
|
|
|
|
config SHELL_BACKSPACE_MODE_DELETE
|
|
|
|
bool "Default escape code for backspace is DELETE (0x7F)"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Terminals have different escape code settings for backspace button.
|
|
|
|
Some terminals send code: 0x08 (backspace) other 0x7F (delete). When
|
|
|
|
this option is set shell will expect 0x7F for backspace key.
|
|
|
|
|
|
|
|
config SHELL_CMD_BUFF_SIZE
|
|
|
|
int "Shell command buffer size"
|
|
|
|
default 256
|
|
|
|
help
|
2019-01-31 01:29:45 +08:00
|
|
|
Maximum command size in bytes. One byte is reserved for the string
|
|
|
|
terminator character.
|
2018-08-09 15:56:10 +08:00
|
|
|
|
|
|
|
config SHELL_PRINTF_BUFF_SIZE
|
|
|
|
int "Shell print buffer size"
|
|
|
|
default 30
|
|
|
|
help
|
|
|
|
Maximum text buffer size for fprintf function.
|
|
|
|
It is working like stdio buffering in Linux systems
|
|
|
|
to limit number of peripheral access calls.
|
|
|
|
|
2020-05-13 13:49:57 +08:00
|
|
|
config SHELL_DEFAULT_TERMINAL_WIDTH
|
|
|
|
int "Default terminal width"
|
|
|
|
default 80
|
|
|
|
help
|
|
|
|
Default terminal width is used to break lines.
|
|
|
|
|
|
|
|
config SHELL_DEFAULT_TERMINAL_HEIGHT
|
|
|
|
int "Default terminal height"
|
|
|
|
default 24
|
|
|
|
|
2018-08-09 15:56:10 +08:00
|
|
|
config SHELL_ARGC_MAX
|
|
|
|
int "Maximum arguments in shell command"
|
|
|
|
default 12
|
|
|
|
help
|
|
|
|
Maximum number of arguments that can build a command.
|
|
|
|
If command is composed of more than defined, argument SHELL_ARGC_MAX
|
|
|
|
and following are passed as one argument in the string.
|
|
|
|
|
2018-08-09 17:57:31 +08:00
|
|
|
config SHELL_WILDCARD
|
|
|
|
bool "Enable wildcard support in shell"
|
|
|
|
select FNMATCH
|
2018-10-29 20:25:49 +08:00
|
|
|
default y
|
2018-08-09 17:57:31 +08:00
|
|
|
help
|
2018-10-29 20:25:49 +08:00
|
|
|
Enables using wildcards: * and ? in the shell.
|
2018-08-09 17:57:31 +08:00
|
|
|
|
2018-08-09 15:56:10 +08:00
|
|
|
config SHELL_ECHO_STATUS
|
|
|
|
bool "Enable echo on shell"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
If enabled shell prints back every input byte.
|
|
|
|
|
|
|
|
config SHELL_VT100_COLORS
|
|
|
|
bool "Enable colors in shell"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
If enabled VT100 colors are used in shell (e.g. print errors in red).
|
|
|
|
|
|
|
|
config SHELL_METAKEYS
|
|
|
|
bool "Enable metakeys"
|
|
|
|
default y
|
|
|
|
help
|
2019-01-27 20:09:39 +08:00
|
|
|
Enables shell meta keys: Ctrl+a, Ctrl+b, Ctrl+c, Ctrl+d, Ctrl+e,
|
|
|
|
Ctrl+f, Ctrl+k, Ctrl+l, Ctrl+u, Ctrl+w, Alt+b, Alt+f
|
|
|
|
Meta keys will not be active when shell echo is set to off.
|
2018-08-09 15:56:10 +08:00
|
|
|
|
|
|
|
config SHELL_HELP
|
|
|
|
bool "Enable help message"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enables formatting help message when requested with '-h' or '--help'.
|
|
|
|
|
|
|
|
config SHELL_HELP_ON_WRONG_ARGUMENT_COUNT
|
|
|
|
bool "Enable printing help on wrong argument count"
|
2018-08-09 17:57:31 +08:00
|
|
|
depends on SHELL_HELP
|
2018-08-09 15:56:10 +08:00
|
|
|
default y
|
|
|
|
|
2018-08-09 16:38:15 +08:00
|
|
|
config SHELL_HISTORY
|
|
|
|
bool "Enable history in shell"
|
|
|
|
default y
|
2019-02-05 21:27:31 +08:00
|
|
|
select RING_BUFFER
|
2018-08-09 16:38:15 +08:00
|
|
|
help
|
|
|
|
Enable commands history. History can be accessed using up and down
|
2019-01-31 01:29:45 +08:00
|
|
|
arrows.
|
2018-08-09 16:38:15 +08:00
|
|
|
|
|
|
|
config SHELL_HISTORY_BUFFER
|
|
|
|
int "History buffer in bytes"
|
2019-02-05 21:27:31 +08:00
|
|
|
default 512
|
kconfig: Replace some single-symbol 'if's with 'depends on'
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.
There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.
The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).
Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.
Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.
Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.
The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.
(Everything above is true for choices, menus, and comments as well.)
Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 10:45:50 +08:00
|
|
|
depends on SHELL_HISTORY
|
2018-08-09 16:38:15 +08:00
|
|
|
help
|
|
|
|
Number of bytes dedicated for storing executed commands.
|
|
|
|
|
2018-08-09 17:40:02 +08:00
|
|
|
config SHELL_STATS
|
|
|
|
bool "Enable shell statistics"
|
|
|
|
default y
|
|
|
|
|
2018-08-09 16:57:07 +08:00
|
|
|
config SHELL_CMDS
|
|
|
|
bool "Enable built-in commands"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enable built-in commands like 'clear', 'history', etc.
|
|
|
|
|
|
|
|
config SHELL_CMDS_RESIZE
|
|
|
|
bool "Enable resize command"
|
|
|
|
depends on SHELL_CMDS
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
By default shell assumes width of a terminal screen set to 80
|
|
|
|
characters. Each time terminal screen width is changed resize command
|
|
|
|
must be called to ensure correct text display on the terminal screen.
|
2019-01-31 01:29:45 +08:00
|
|
|
The resize command can be turned off to save code memory (~0,5k).
|
2018-08-09 16:57:07 +08:00
|
|
|
|
2019-05-16 17:02:53 +08:00
|
|
|
config SHELL_CMDS_SELECT
|
|
|
|
bool "Enable select command"
|
|
|
|
depends on SHELL_CMDS
|
|
|
|
help
|
|
|
|
This option enables select command. It can be used to set new root
|
|
|
|
command. Exit to main command tree is with alt+r.
|
|
|
|
|
2018-09-20 20:45:56 +08:00
|
|
|
config SHELL_LOG_BACKEND
|
|
|
|
bool
|
2019-09-23 08:19:19 +08:00
|
|
|
depends on !LOG_MINIMAL
|
2018-09-20 20:45:56 +08:00
|
|
|
default y if LOG
|
|
|
|
|
2018-08-09 21:03:58 +08:00
|
|
|
source "subsys/shell/modules/Kconfig"
|
|
|
|
|
2019-04-09 20:14:58 +08:00
|
|
|
endif # SHELL
|