[libvirt] [PATCH] virsh: suppress aliases in group help

'virsh help | grep nodedev-det' shows only nodedev-detach, but 'virsh help nodedev | grep nodedev-det' also shows the older alias that we intentionally hid in commit af3f9aab. See also commit 787f4fe and this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=956966 * tools/virsh.c (vshCmdGrpHelp): Copy suppression of vshCmdHelp. Signed-off-by: Eric Blake <eblake@redhat.com> --- tools/virsh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh.c b/tools/virsh.c index 4cd93ca..6ec2f7b 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -1177,6 +1177,8 @@ vshCmdGrpHelp(vshControl *ctl, const char *grpname) grp->keyword); for (cmd = grp->commands; cmd->name; cmd++) { + if (cmd->flags & VSH_CMD_FLAG_ALIAS) + continue; vshPrint(ctl, " %-30s %s\n", cmd->name, _(vshCmddefGetInfo(cmd, "help"))); } -- 1.8.1.4

On 04/26/2013 12:42 PM, Eric Blake wrote:
'virsh help | grep nodedev-det' shows only nodedev-detach, but 'virsh help nodedev | grep nodedev-det' also shows the older alias that we intentionally hid in commit af3f9aab.
See also commit 787f4fe and this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=956966
* tools/virsh.c (vshCmdGrpHelp): Copy suppression of vshCmdHelp.
Signed-off-by: Eric Blake <eblake@redhat.com> --- tools/virsh.c | 2 ++ 1 file changed, 2 insertions(+)
ACK Jan

On 04/26/2013 05:54 AM, Ján Tomko wrote:
On 04/26/2013 12:42 PM, Eric Blake wrote:
'virsh help | grep nodedev-det' shows only nodedev-detach, but 'virsh help nodedev | grep nodedev-det' also shows the older alias that we intentionally hid in commit af3f9aab.
See also commit 787f4fe and this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=956966
* tools/virsh.c (vshCmdGrpHelp): Copy suppression of vshCmdHelp.
Signed-off-by: Eric Blake <eblake@redhat.com> --- tools/virsh.c | 2 ++ 1 file changed, 2 insertions(+)
ACK
Thanks; pushed. /me feels silly for having not one, but two commits needed to clean up my original intent of hidden command aliases -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Ján Tomko