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

[libvirt] [PATCH] virsh: trim aliases from -h output



Commit af3f9aab taught 'virsh help' to ignore command aliases,
but forgot 'virsh -h'.

* tools/virsh.c (vshUsage): Handle aliases.
---
 tools/virsh.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 19f9bbe..e48c56a 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -19721,8 +19721,11 @@ vshUsage(void)
         fprintf(stdout, _(" %s (help keyword '%s')\n"), grp->name, grp->keyword);

         for (cmd = grp->commands; cmd->name; cmd++)
+            if (cmd->flags & VSH_CMD_FLAG_ALIAS)
+                continue;
             fprintf(stdout,
-                    "    %-30s %s\n", cmd->name, _(vshCmddefGetInfo(cmd, "help")));
+                    "    %-30s %s\n", cmd->name,
+                    _(vshCmddefGetInfo(cmd, "help")));

         fprintf(stdout, "\n");
     }
-- 
1.7.7.6


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