vsh: Introduce complete command

This command is going to be called from bash completion script in
the following form:

  virsh complete -- start --domain

Its only purpose is to return list of possible strings for
completion. Note that this is a 'hidden', unlisted command and
therefore there's no documentation to it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik
2017-11-01 15:34:14 +01:00
parent cc005fe5a8
commit a0e1ada63c
4 changed files with 96 additions and 0 deletions

View File

@@ -1351,6 +1351,7 @@ static const vshCmdDef vshAdmCmds[] = {
VSH_CMD_PWD,
VSH_CMD_QUIT,
VSH_CMD_SELF_TEST,
VSH_CMD_COMPLETE,
{.name = "uri",
.handler = cmdURI,
.opts = NULL,