]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Add vshCompleter to each option
authorTomas Meszaros <exo@tty.sk>
Tue, 10 Sep 2013 15:54:26 +0000 (17:54 +0200)
committerEric Blake <eblake@redhat.com>
Tue, 17 Sep 2013 23:47:33 +0000 (17:47 -0600)
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>
tools/virsh.h

index b5e2715e6521a05a0b20c45f5df3d5a7c050ad8c..f978d94f6b2089d13d0969ec4861b06b88fc37ed 100644 (file)
@@ -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 */
 };
 
 /*