summaryrefslogtreecommitdiffstats
path: root/src/vlib/cli.h
diff options
context:
space:
mode:
authorYoann Desmouceaux <ydesmouc@cisco.com>2017-05-18 11:00:48 +0200
committerChris Luke <chris_luke@comcast.com>2017-05-23 17:55:11 +0000
commit3060e07b71fd4dd6203769d73c4f8f21709f9b9c (patch)
tree5f1750c2c0e2c97fd141064655ecebeb609682d1 /src/vlib/cli.h
parent8c4611b39162da9753caaf654741faa115eaf612 (diff)
Add TAB-based auto-completion to the CLI
Hitting tab: - in the middle of a uniquely defined subcommand will expand the subcommand - in the middle of a non-uniquely defined (or empty) subcommand will display all possible subcommands, and possibly expand to the lowest common prefix Change-Id: Ib858eefdb0353cd2c3aad472799d15cd537455a0 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
Diffstat (limited to 'src/vlib/cli.h')
-rw-r--r--src/vlib/cli.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vlib/cli.h b/src/vlib/cli.h
index 009c7e82cf7..e713808f18e 100644
--- a/src/vlib/cli.h
+++ b/src/vlib/cli.h
@@ -181,6 +181,10 @@ clib_error_t *vlib_cli_register_parse_rule (struct vlib_main_t *vm,
uword unformat_vlib_cli_sub_input (unformat_input_t * i, va_list * args);
+/* Return an vector of strings consisting of possible auto-completions
+ * for a given input string */
+u8 **vlib_cli_get_possible_completions (u8 * input_str);
+
#endif /* included_vlib_cli_h */
/*