Skip to content

Commit

Permalink
frugen: help: Add listing of short options
Browse files Browse the repository at this point in the history
`frugen --help` will not show short options along
with the long ones.

Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
  • Loading branch information
AlexanderAmelkin committed Mar 19, 2021
1 parent 57bf60b commit 823956c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frugen.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,10 @@ int main(int argc, char *argv[])
"\n"
"Options:\n\n");
for (i = 0; i < ARRAY_SZ(options); i++) {
printf("\t--%s%s\n" /* "\t-%c%s\n" */, options[i].name,
options[i].has_arg ? " <argument>" : "");
printf("\t-%c, --%s%s\n" /* "\t-%c%s\n" */,
options[i].val,
options[i].name,
options[i].has_arg ? " <argument>" : "");
printf("\t\t%s.\n\n", option_help[options[i].val]);
}
printf("Example:\n"
Expand Down

0 comments on commit 823956c

Please sign in to comment.