Skip to content

Commit 989fef9

Browse files
nordic-krchnashif
authored andcommitted
shell: Add built-in shell commands
Added optional shell commands: - clear - for clearing terminal - history - commands history - resize - terminal resize - shell - controling echo and colors Signed-off-by: Krzysztof Chruscinski <[email protected]> Signed-off-by: Jakub Rzeszutko <[email protected]>
1 parent 82ca811 commit 989fef9

File tree

3 files changed

+510
-0
lines changed

3 files changed

+510
-0
lines changed

subsys/shell/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ zephyr_sources_ifdef(
2323
CONFIG_SHELL_HISTORY
2424
shell_history.c
2525
)
26+
27+
zephyr_sources_ifdef(
28+
CONFIG_SHELL_CMDS
29+
shell_cmds.c
30+
)

subsys/shell/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,20 @@ config SHELL_HISTORY_BUFFER
135135

136136
endif #SHELL_HISTORY
137137

138+
config SHELL_CMDS
139+
bool "Enable built-in commands"
140+
default y
141+
help
142+
Enable built-in commands like 'clear', 'history', etc.
143+
144+
config SHELL_CMDS_RESIZE
145+
bool "Enable resize command"
146+
depends on SHELL_CMDS
147+
default y
148+
help
149+
By default shell assumes width of a terminal screen set to 80
150+
characters. Each time terminal screen width is changed resize command
151+
must be called to ensure correct text display on the terminal screen.
152+
Resize command can be turned off to safe code memory (~0,5k).
153+
138154
endif #SHELL

0 commit comments

Comments
 (0)