aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBoris Brezillon2018-12-05 09:26:50 +0100
committerTom Rini2019-01-15 15:38:28 -0500
commit03dcf17dba3dbd6f1cfe9ecaa0665ea8c11e0ef2 (patch)
tree73d8d68a2d4497ec6000f44d4ae8d4db80b40be2 /include
parent31a2cf1ca4968dcaf78aef222b6683fea4f2c72d (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h
index 657cc404cfa..18948b6bc2d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);