!569 shell命令行输入增加回退支持

Merge pull request !569 from 方烨/master
This commit is contained in:
openharmony_ci 2022-02-10 11:56:34 +00:00 committed by Gitee
commit b534083056
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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;
} }