shell命令行增加回退支持

Signed-off-by: fangye <fangye@talkweb.com.cn>
This commit is contained in:
fangye 2022-01-23 19:10:43 +08:00
parent e133ce6865
commit d986648e9c
1 changed files with 5 additions and 0 deletions

5
components/shell/src/base/shmsg.c Executable file → Normal file
View File

@ -216,6 +216,11 @@ VOID ShellTaskEntry(VOID)
ptr = buf; ptr = buf;
break; break;
} }
if (*ptr == '\b' && ptr != buf) { /* support backspace */
PRINTK("\b \b");
ptr--;
break;
}
if (!VISIABLE_CHAR(*ptr)) { if (!VISIABLE_CHAR(*ptr)) {
break; break;
} }