1
0
mirror of https://github.com/NevermindZZT/letter-shell.git synced 2025-01-21 10:02:54 +08:00

修复匹配到多个命令时,显示不正确的问题

This commit is contained in:
Letter 2019-01-08 19:46:21 +08:00
parent 37d0870e8b
commit 081382199b

View File

@ -44,7 +44,7 @@ void shellInit(SHELL_TypeDef *shell)
{ {
shellDisplay(shell, "\r\n\r\n"); shellDisplay(shell, "\r\n\r\n");
shellDisplay(shell, "+=========================================================+\r\n"); shellDisplay(shell, "+=========================================================+\r\n");
shellDisplay(shell, "| (C) COPYRIGHT 2018 Unilink |\r\n"); shellDisplay(shell, "| (C) COPYRIGHT 2018 Letter |\r\n");
shellDisplay(shell, "| Letter shell v"SHELL_VERSION" |\r\n"); shellDisplay(shell, "| Letter shell v"SHELL_VERSION" |\r\n");
shellDisplay(shell, "| Build: "__DATE__" "__TIME__" |\r\n"); shellDisplay(shell, "| Build: "__DATE__" "__TIME__" |\r\n");
shellDisplay(shell, "+=========================================================+\r\n"); shellDisplay(shell, "+=========================================================+\r\n");
@ -78,7 +78,7 @@ void shellInit(SHELL_TypeDef *shell)
* @param base * @param base
* @param size * @param size
* *
* @note shellInit之前调用 * @note shellInit之前调用
* @note 使() * @note 使()
*/ */
void shellSetCommandList(SHELL_TypeDef *shell, SHELL_CommandTypeDef *base, unsigned short size) void shellSetCommandList(SHELL_TypeDef *shell, SHELL_CommandTypeDef *base, unsigned short size)
@ -456,6 +456,7 @@ static void shellTab(SHELL_TypeDef *shell)
{ {
shell->length = maxMatch; shell->length = maxMatch;
} }
shell->buffer[shell->length] = 0;
shell->cursor = shell->length; shell->cursor = shell->length;
shellDisplay(shell, shell->buffer); shellDisplay(shell, shell->buffer);
} }