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

Re: [libvirt] consistency of virsh help output



On 02/09/2011 07:26 PM, Eric Blake wrote:
[...]
attach-disk<domain>  <source>  <target>  [<driver>]


When understood, it's ok. And the majority of virsh commands have this
format; except 19; I would stick with it.

I also like the shorter form.


Fine :o) I don't mind either of those.

0001-Unify-virsh-help-synopsis-output.patch> From 2ce39caeb82a9a0b2dccc409ac986648c4017191 Mon Sep 17 00:00:00 2001
From: Zdenek Styblik<stybla turnovfree net>
Date: Sun, 6 Feb 2011 08:50:43 +0100
Subject: [PATCH] Unify virsh help synopsis output
  Signed-off-by: Zdenek Styblik<stybla turnovfree net>

---
  tools/virsh.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 1f820e8..cc8efcf 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -10596,11 +10596,11 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
                  case VSH_OT_INT:
                      /* xgettext:c-format */
                      fmt = ((opt->flag&  VSH_OFLAG_REQ) ? "<%s>"
-                           : _("[--%s<number>]"));
+                           : _("[%s]"));
                      break;
                  case VSH_OT_STRING:
                      /* xgettext:c-format */
-                    fmt = _("[--%s<string>]");
+                    fmt = _("[%s]");
                      break;

Actually, I think these would be _("[<%s>]") (note the<>  to signify the
meta-syntactic term).  But I like the idea; this shortens the synopsis
form, while still leaving the usage form to explain the meta-syntactic term.


Right, because '--%s' is mandatory. Should I re-post the patch, or...?

Thanks,
Z.

--
Zdenek Styblik
Net/Linux admin
OS TurnovFree.net
email: stybla turnovfree net
jabber: stybla jabber turnovfree net


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