mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
command.c: Fix auto-completion for the full commands list case
Compiling of full list of commands does not advance the counter,
so it always results in an empty list.
This seems to be (inadvertently?) introduced by commit
6c7c946cad
.
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
This commit is contained in:
parent
4d3b8a0d1b
commit
9b438946c9
1 changed files with 2 additions and 2 deletions
|
@ -184,10 +184,10 @@ static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv
|
|||
/* output full list of commands */
|
||||
for (; cmdtp != cmdend; cmdtp++) {
|
||||
if (n_found >= maxv - 2) {
|
||||
cmdv[n_found] = "...";
|
||||
cmdv[n_found++] = "...";
|
||||
break;
|
||||
}
|
||||
cmdv[n_found] = cmdtp->name;
|
||||
cmdv[n_found++] = cmdtp->name;
|
||||
}
|
||||
cmdv[n_found] = NULL;
|
||||
return n_found;
|
||||
|
|
Loading…
Add table
Reference in a new issue