#include "virxml.h"
#include "virperf.h"
#include "virbitmap.h"
+#include "virkeycode.h"
char **
virshDomainNameCompleter(vshControl *ctl,
return g_steal_pointer(&tmp);
}
+
+
+char **
+virshCodesetNameCompleter(vshControl *ctl G_GNUC_UNUSED,
+ const vshCmd *cmd G_GNUC_UNUSED,
+ unsigned int flags)
+{
+ g_auto(GStrv) tmp = NULL;
+ size_t i = 0;
+
+ virCheckFlags(0, NULL);
+
+ tmp = g_new0(char *, VIR_KEYCODE_SET_LAST + 1);
+
+ for (i = 0; i < VIR_KEYCODE_SET_LAST; i++) {
+ const char *name = virKeycodeSetTypeToString(i);
+ tmp[i] = g_strdup(name);
+ }
+
+ return g_steal_pointer(&tmp);
+}
{.name = "codeset",
.type = VSH_OT_STRING,
.flags = VSH_OFLAG_REQ_OPT,
+ .completer = virshCodesetNameCompleter,
.help = N_("the codeset of keycodes, default:linux")
},
{.name = "holdtime",