]> git.baikalelectronics.ru Git - uboot.git/commit
common: command: Expose a generic helper to auto-complete sub commands
authorBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 3 Dec 2018 21:54:19 +0000 (22:54 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 15 Jan 2019 20:28:53 +0000 (15:28 -0500)
commit2228caa2fa3bb815447dffec4fa81aebd800aba3
tree32d40a84b5d768b3517f0eb4f2bdf2e96d7657ba
parent1c5b1a57003f369999b95b13d70b0b3afe8f2248
common: command: Expose a generic helper to auto-complete sub commands

Some commands have a table of sub-commands. With minor adjustments,
complete_cmdv() is able to provide auto-completion for sub-commands
(it's just about passing the table of commands instead of taking the
global one).
We rename this function into complete_subcmd() and implement
complete_cmdv() as a wrapper around complete_subcmdv().

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
common/command.c
include/command.h