The intended use of those commands is to use the argument directly
without the flag. Since the argument is optional in all cases we
couldn't declare them as positional until now.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
static const vshCmdOptDef opts_connect[] = {
{.name = "name",
.type = VSH_OT_STRING,
+ .positional = true,
.flags = VSH_OFLAG_EMPTY_OK,
.completer = virshCompleteEmpty,
.help = N_("hypervisor connection URI")
static const vshCmdOptDef opts_connect[] = {
{.name = "name",
.type = VSH_OT_STRING,
+ .positional = true,
.flags = VSH_OFLAG_EMPTY_OK,
.help = N_("daemon's admin server connection URI")
},
const vshCmdOptDef opts_help[] = {
{.name = "command",
.type = VSH_OT_STRING,
+ .positional = true,
.completer = vshCompleteHelpCommand,
.help = N_("Prints global help, command specific help, or help for a group of related commands")
},
const vshCmdOptDef opts_cd[] = {
{.name = "dir",
.type = VSH_OT_STRING,
+ .positional = true,
.help = N_("directory to switch to (default: home or else root)")
},
{.name = NULL}