[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



于 2010年12月03日 01:47, Eric Blake 写道:
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.


I thought "<command-or-group>" is too long before, so didn't use it,
now I change the mind, as think user nearly won't use it, they could
directly get the help by "# virsh help $word", where it's long or
short doesn't matter much then.

so I will make patch to use <command-or-group>

Thanks

- Osier

--
libvir-list mailing list
libvir-list redhat com
https://www.redhat.com/mailman/listinfo/libvir-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]