mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
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.
This commit is contained in:
parent
f987d17511
commit
787f4feb4d
@ -19718,12 +19718,15 @@ vshUsage(void)
|
|||||||
" commands (non interactive mode):\n\n"), progname, progname);
|
" commands (non interactive mode):\n\n"), progname, progname);
|
||||||
|
|
||||||
for (grp = cmdGroups; grp->name; grp++) {
|
for (grp = cmdGroups; grp->name; grp++) {
|
||||||
fprintf(stdout, _(" %s (help keyword '%s')\n"), grp->name, grp->keyword);
|
fprintf(stdout, _(" %s (help keyword '%s')\n"),
|
||||||
|
grp->name, grp->keyword);
|
||||||
for (cmd = grp->commands; cmd->name; cmd++)
|
for (cmd = grp->commands; cmd->name; cmd++) {
|
||||||
|
if (cmd->flags & VSH_CMD_FLAG_ALIAS)
|
||||||
|
continue;
|
||||||
fprintf(stdout,
|
fprintf(stdout,
|
||||||
" %-30s %s\n", cmd->name, _(vshCmddefGetInfo(cmd, "help")));
|
" %-30s %s\n", cmd->name,
|
||||||
|
_(vshCmddefGetInfo(cmd, "help")));
|
||||||
|
}
|
||||||
fprintf(stdout, "\n");
|
fprintf(stdout, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user