mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
common: command: Add support for $ auto-completion
Add the dollar_complete() function to auto-complete arguments starting with a '$' and use it in the cmd_auto_complete() path such that all args starting with a $ can be auto-completed based on the available env vars. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> [trini: Fix some linking problems] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
31a2cf1ca4
commit
03dcf17dba
4 changed files with 77 additions and 13 deletions
|
@ -248,7 +248,8 @@ static inline int env_set_addr(const char *varname, const void *addr)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_AUTO_COMPLETE
|
||||
int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
|
||||
int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf,
|
||||
bool dollar_comp);
|
||||
#endif
|
||||
int get_env_id (void);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue