summaryrefslogtreecommitdiffstats
path: root/commands/global.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-10-18 14:36:49 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-10-18 22:45:32 +0200
commiteca7871bced78837154ad52c42864ba3c87a9904 (patch)
treed6ad489173bde58cef1c41c8f01f2698fa661343 /commands/global.c
parent57aac5f1ff63b4997d3dc665c4c05f5470a1e681 (diff)
downloadbarebox-eca7871bced78837154ad52c42864ba3c87a9904.tar.gz
complete: Add completion for nv and globalvar commands
The 'nv' command is often used to create a nv variable for an existing global variable, so add a command completion function for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/global.c')
-rw-r--r--commands/global.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/global.c b/commands/global.c
index d21b829..fc68716 100644
--- a/commands/global.c
+++ b/commands/global.c
@@ -22,6 +22,7 @@
#include <globalvar.h>
#include <environment.h>
#include <getopt.h>
+#include <complete.h>
static int do_global(int argc, char *argv[])
{
@@ -77,4 +78,5 @@ BAREBOX_CMD_START(global)
BAREBOX_CMD_OPTS("[-r] VAR[=VALUE] ...")
BAREBOX_CMD_GROUP(CMD_GRP_ENV)
BAREBOX_CMD_HELP(cmd_global_help)
+ BAREBOX_CMD_COMPLETE(nv_global_complete)
BAREBOX_CMD_END