shared/shell: Fix auto-completion of invalid commands

bt_shell always complements the invalid commands, which are the menu/back
command.
This commit is contained in:
ERAMOTO Masaya 2017-12-11 16:18:10 +09:00 committed by Luiz Augusto von Dentz
parent 957d48aff5
commit c7a7849c8c

View File

@ -498,7 +498,7 @@ static char *find_cmd(const char *text,
while ((cmd = entry[*index].cmd)) {
(*index)++;
if (!strncmp(cmd, text, len))
if (!strncmp(cmd, text, len) && !command_isskipped(cmd))
return strdup(cmd);
}