.type = VSH_OT_ALIAS,
.help = "string=hello"
},
+ {.name = "prefix",
+ .type = VSH_OT_STRING,
+ .help = N_("prefix the message")
+ },
{.name = "string",
.type = VSH_OT_ARGV,
.positional = true,
bool xml = vshCommandOptBool(cmd, "xml");
bool err = vshCommandOptBool(cmd, "err");
bool split = vshCommandOptBool(cmd, "split");
+ const char *prefix;
const vshCmdOpt *opt = NULL;
g_autofree char *arg = NULL;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
VSH_EXCLUSIVE_OPTIONS_VAR(shell, split);
VSH_EXCLUSIVE_OPTIONS_VAR(xml, split);
+ ignore_value(vshCommandOptString(ctl, cmd, "prefix", &prefix));
+
+ if (prefix)
+ virBufferAsprintf(&buf, "%s ", prefix);
+
while ((opt = vshCommandOptArgv(ctl, cmd, opt))) {
const char *curr = opt->data;