-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Reconstruct the shell, manage historical commands using list, and add the ctrl+z/y functions #10986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
c54a634
3bbdd61
e54ec9b
e75b33e
1ef140c
f390451
8c371d8
7e75c07
793a78f
c78e433
b99cde0
5d0d6ed
7185932
95589a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,24 +29,28 @@ if RT_USING_MSH | |
| config FINSH_USING_HISTORY | ||
| bool "Enable command history feature" | ||
| default y | ||
|
|
||
| if FINSH_USING_HISTORY | ||
| config FINSH_HISTORY_LINES | ||
| int "The command history line number" | ||
| default 5 | ||
| endif | ||
| if FINSH_USING_HISTORY | ||
| config FINSH_HISTORY_LINES | ||
| int "The command history line number" | ||
| default 10 | ||
| endif | ||
|
|
||
| config FINSH_USING_SNAPSHOT | ||
| bool "Enable command Ctrl+Z/Ctrl+Y snapshot feature" | ||
| default n | ||
| if FINSH_USING_SNAPSHOT | ||
| config FINSH_SNAPSHOT_DEPTH | ||
| int "The command snapshot depth" | ||
| default 10 | ||
| endif | ||
|
Comment on lines
38
to
51
|
||
|
|
||
| config FINSH_USING_WORD_OPERATION | ||
| bool "Enable word-based cursor operations" | ||
| bool "Enable Ctrl+W/Backspace/Ctrl+Left/Right word-based cursor operations" | ||
youzuwei marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| default n | ||
| help | ||
| Enable Ctrl+Backspace to delete words and Ctrl+Arrow to move cursor by word | ||
|
|
||
| config FINSH_USING_FUNC_EXT | ||
| bool "Enable function extension home end ins del" | ||
|
|
||
| config FINSH_USING_EXTEND_FEATURE | ||
| bool "Enable insert/delete/home/end extend feature" | ||
| default n | ||
| help | ||
| Enable function extension home end ins del. | ||
|
|
||
youzuwei marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| config FINSH_USING_SYMTAB | ||
| bool "Using symbol table for commands" | ||
|
|
@@ -67,24 +71,31 @@ if RT_USING_MSH | |
| config FINSH_ECHO_DISABLE_DEFAULT | ||
| bool "Disable the echo mode in default" | ||
| default n | ||
|
|
||
| config FINSH_PROMPT_ENABLE_DEFAULT | ||
| bool "Enable the prompt mode in default" | ||
| default y | ||
|
|
||
| config FINSH_PROMPT_WORD_DEFAULT | ||
| string "The default prompt word" | ||
| default "msh " | ||
|
|
||
| config FINSH_USING_AUTH | ||
| bool "shell support authentication" | ||
| default n | ||
|
|
||
| if FINSH_USING_AUTH | ||
| config FINSH_DEFAULT_PASSWORD | ||
| string "The default password for shell authentication" | ||
| default "rtthread" | ||
|
|
||
| config FINSH_PASSWORD_MIN | ||
| int "The password min length" | ||
| default 6 | ||
|
|
||
| config FINSH_PASSWORD_MAX | ||
| int "The password max length" | ||
| default RT_NAME_MAX | ||
| endif | ||
| if FINSH_USING_AUTH | ||
| config FINSH_DEFAULT_PASSWORD | ||
| string "The default password for shell authentication" | ||
| default "rtthread" | ||
|
|
||
| config FINSH_PASSWORD_MIN | ||
| int "The password min length" | ||
| default 6 | ||
|
|
||
| config FINSH_PASSWORD_MAX | ||
| int "The password max length" | ||
| default RT_NAME_MAX | ||
| endif | ||
|
|
||
| config FINSH_ARG_MAX | ||
| int "The number of arguments for a shell command" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API design: Breaking change in default value / API 设计:默认值的破坏性更改
English: The default value for
FINSH_HISTORY_LINEShas been changed from 5 to 10. While this improves functionality, it increases memory usage by 100% for users who rely on the default. This is a breaking change for embedded systems with tight memory constraints.Recommendation: Consider keeping the default at 5 for backward compatibility, or clearly document this change in the PR description as a breaking change with memory impact.
中文:
FINSH_HISTORY_LINES的默认值从 5 更改为 10。虽然这改进了功能,但对于依赖默认值的用户,内存使用增加了 100%。这对于内存紧张的嵌入式系统是一个破坏性更改。建议: 考虑保持默认值为 5 以实现向后兼容,或在 PR 描述中明确记录此更改为具有内存影响的破坏性更改。