From: Peter Krempa <pkrempa(a)redhat.com>
Few outstanding arguments were not marked with completers
completer despite the fact that we can't provide any reasonable
suggestion (e.g 'echo' or 'complete' commands) or where we want to
complete local path ( 'cd' ).
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tools/vsh.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/vsh.c b/tools/vsh.c
index d1e699505b..05845e2c1e 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -46,6 +46,8 @@
#include "virstring.h"
#include "virutil.h"
+#include "vsh-completer.h"
+
#ifdef WITH_READLINE
/* For autocompletion */
vshControl *autoCompleteOpaque;
@@ -3283,6 +3285,7 @@ const vshCmdOptDef opts_cd[] = {
{.name = "dir",
.type = VSH_OT_STRING,
.positional = true,
+ .completer = vshCompletePathLocalExisting,
.help = N_("directory to switch to (default: home or else root)")
},
{.name = NULL}
@@ -3340,11 +3343,13 @@ const vshCmdOptDef opts_echo[] = {
},
{.name = "prefix",
.type = VSH_OT_STRING,
+ .completer = vshCompleteEmpty,
.help = N_("prefix the message")
},
{.name = "string",
.type = VSH_OT_ARGV,
.positional = true,
+ .completer = vshCompleteEmpty,
.help = N_("arguments to echo")
},
{.name = NULL}
@@ -3491,6 +3496,7 @@ const vshCmdOptDef opts_complete[] = {
.type = VSH_OT_ARGV,
.positional = true,
.allowEmpty = true,
+ .completer = vshCompleteEmpty,
.help = N_("partial string to autocomplete")
},
{.name = NULL}
--
2.49.0