[libvirt] [PATCH] man pages: update the description for the virsh help command

Eric Blake eblake at redhat.com
Thu Dec 2 17:47:21 UTC 2010


On 12/02/2010 06:04 AM, Justin Clift wrote:
> Now includes information on keyword usage, and provides examples.
> ---
>  tools/virsh.pod |   37 ++++++++++++++++++++++++++++++++++---
>  1 files changed, 34 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/virsh.pod b/tools/virsh.pod
> index c97786a..66654a7 100644
> --- a/tools/virsh.pod
> +++ b/tools/virsh.pod
> @@ -115,10 +115,41 @@ The following commands are generic i.e. not specific to a domain.
>  
>  =over 4
>  
> -=item B<help> optional I<command>
> +=item B<help> optional I<--command> I<command> | I<group-keyword>

Hmm, this doesn't quite match 'virsh help help', which if used literally
would translate to:

=item B<help> optional I<command> I<group>

On the other hand, I'm thinking we implemented the help command slightly
wrong by specifying that it takes two optional strings.  Really, it only
takes one optional string, which is a command-or-group.  For instance,
with the current code, 'virsh help --group help' lists a command help,
rather than a group help, and 'virsh help --command virsh' lists the
group help, rather than a command help.  Meanwhile, 'virsh help help
virsh' is accepted by the parser, but silently ignores the virsh group
argument.

So I'm thinking we need yet another patch to virsh.c that reduces
opts_help to just one VSH_OT_DATA flag name (whether we keep it named
--command, or rename it to --command-or-group, is another question,
which is also impacted by whether we decide to implement unambiguous
prefix parsing like getopt_long).  In the meantime, how about we list
this line as:

=item B<help> optional I<command-or-group>

ACK with that one-line change; the rest of the patch is uncontroversial,
and the virsh.c cleanup can be a separate patch.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101202/db292ed0/attachment-0001.sig>


More information about the libvir-list mailing list