summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTomas Meszaros <exo@tty.sk>2013-09-10 17:54:26 +0200
committerEric Blake <eblake@redhat.com>2013-09-17 17:47:33 -0600
commitffb7ccaa7059aed3a2dfdf5630a4b1aa321d2551 (patch)
tree42efdfef99d018f6e87da88b9a94e41c4ff580b2 /tools
parent22547b4c98254f784517475a55c583c5703ea985 (diff)
downloadlibvirt-ffb7ccaa7059aed3a2dfdf5630a4b1aa321d2551.tar.gz
virsh: Add vshCompleter to each option
completer and completer_flags added to the _vshCmdOptDef structure so it will be possible for completion generators to conveniently call option completer functions with desired flags. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virsh.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/virsh.h b/tools/virsh.h
index b5e2715e65..f978d94f6b 100644
--- a/tools/virsh.h
+++ b/tools/virsh.h
@@ -148,6 +148,8 @@ typedef struct _vshCmdOptDef vshCmdOptDef;
typedef struct _vshControl vshControl;
typedef struct _vshCtrlData vshCtrlData;
+typedef char **(*vshCompleter)(unsigned int flags);
+
/*
* vshCmdInfo -- name/value pair for information about command
*
@@ -169,6 +171,8 @@ struct _vshCmdOptDef {
unsigned int flags; /* flags */
const char *help; /* non-NULL help string; or for VSH_OT_ALIAS
* the name of a later public option */
+ vshCompleter completer; /* option completer */
+ unsigned int completer_flags; /* option completer flags */
};
/*