mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
vsh: Make the only argument of 'connect', 'cd', and 'help' commands positional
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>
This commit is contained in:
parent
fc7934695d
commit
0ce337b20c
@ -245,6 +245,7 @@ virshReconnect(vshControl *ctl, const char *name, bool readonly, bool force)
|
|||||||
static const vshCmdOptDef opts_connect[] = {
|
static const vshCmdOptDef opts_connect[] = {
|
||||||
{.name = "name",
|
{.name = "name",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.flags = VSH_OFLAG_EMPTY_OK,
|
.flags = VSH_OFLAG_EMPTY_OK,
|
||||||
.completer = virshCompleteEmpty,
|
.completer = virshCompleteEmpty,
|
||||||
.help = N_("hypervisor connection URI")
|
.help = N_("hypervisor connection URI")
|
||||||
|
@ -254,6 +254,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
|||||||
static const vshCmdOptDef opts_connect[] = {
|
static const vshCmdOptDef opts_connect[] = {
|
||||||
{.name = "name",
|
{.name = "name",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.flags = VSH_OFLAG_EMPTY_OK,
|
.flags = VSH_OFLAG_EMPTY_OK,
|
||||||
.help = N_("daemon's admin server connection URI")
|
.help = N_("daemon's admin server connection URI")
|
||||||
},
|
},
|
||||||
|
@ -3163,6 +3163,7 @@ vshCompleteHelpCommand(vshControl *ctl G_GNUC_UNUSED,
|
|||||||
const vshCmdOptDef opts_help[] = {
|
const vshCmdOptDef opts_help[] = {
|
||||||
{.name = "command",
|
{.name = "command",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.completer = vshCompleteHelpCommand,
|
.completer = vshCompleteHelpCommand,
|
||||||
.help = N_("Prints global help, command specific help, or help for a group of related commands")
|
.help = N_("Prints global help, command specific help, or help for a group of related commands")
|
||||||
},
|
},
|
||||||
@ -3220,6 +3221,7 @@ cmdHelp(vshControl *ctl, const vshCmd *cmd)
|
|||||||
const vshCmdOptDef opts_cd[] = {
|
const vshCmdOptDef opts_cd[] = {
|
||||||
{.name = "dir",
|
{.name = "dir",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
|
.positional = true,
|
||||||
.help = N_("directory to switch to (default: home or else root)")
|
.help = N_("directory to switch to (default: home or else root)")
|
||||||
},
|
},
|
||||||
{.name = NULL}
|
{.name = NULL}
|
||||||
|
Loading…
Reference in New Issue
Block a user