summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
Diffstat (limited to 'help.c')
-rw-r--r--help.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/help.c b/help.c
index 932bdf26..6d042931 100644
--- a/help.c
+++ b/help.c
@@ -162,9 +162,16 @@ static void usage_command_group_internal(const struct cmd_group *grp, int full,
void usage_command_group(const struct cmd_group *grp, int full, int err)
{
+ const char * const *usagestr = grp->usagestr;
FILE *outf = err ? stderr : stdout;
- fprintf(outf, "usage: %s\n\n", grp->usagestr);
+ if (usagestr && *usagestr) {
+ fprintf(outf, "usage: %s\n", *usagestr++);
+ while (*usagestr)
+ fprintf(outf, " or: %s\n", *usagestr++);
+ }
+
+ fputc('\n', outf);
usage_command_group_internal(grp, full, outf);
fputc('\n', outf);