Eric Blake 85d2810823 snapshot: tweak snapshot-create-as diskspec docs
With this patch, it is hopefully a bit more obvious that for
snapshot-create-as, a literal '--diskspec' is mandatory if name
or description was omitted, but optional if all earlier options
were provided.

These all denote two diskspecs and a description:
virsh snapshot-create-as dom name desc vda vdb
virsh snapshot-create-as dom name desc --diskspec vda --diskspec vdb
virsh snapshot-create-as dom name desc --diskspec vda vdb
virsh snapshot-create-as dom name desc vda --diskspec vdb
virsh snapshot-create-as dom --diskspec vda --diskspec vdb name desc

This gives two diskspecs but no description:
virsh snapshot-create-as dom name --diskspec vda --diskspec vdb

And this treats 'vda' as the description, with only one diskspec:
virsh snapshot-create-as dom name vda vdb

The help output now shows:
    snapshot-create-as <domain> [<name>] [<description>] [--print-xml] [--no-metadata] [--halt] [--disk-only] [[--diskspec] <string>]...

I also checked the help output for echo and send-key, which are two
other variants of argv commands.

* tools/virsh.pod (snapshot-create-as): Document when a literal
--diskspec must preceed a diskspec argument.
* tools/virsh.c (vshCmddefHelp): Update help output for argv when
naming the option is useful.
(vshCmddefGetData): Fix logic on when argv was seen.
* tests/virsh-optparse: Add tests to avoid regressions.
2011-09-15 16:18:12 -06:00
..
2010-05-12 08:41:10 +02:00
2011-07-11 19:38:51 +02:00
2011-04-29 10:21:20 -06:00
2011-04-29 14:26:40 -06:00
2011-06-30 18:04:02 +01:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2011-06-24 08:01:10 -06:00
2011-09-02 23:38:52 +08:00
2011-04-29 10:21:20 -06:00
2010-05-12 08:41:10 +02:00
2011-04-29 10:21:20 -06:00
2010-05-12 08:41:10 +02:00
2011-07-11 09:21:37 -06:00
2011-07-21 10:34:51 -06:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2011-07-11 19:38:51 +02:00
2011-07-11 19:38:51 +02:00