diff options
author | David Teigland <teigland@redhat.com> | 2017-02-22 16:38:54 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-02-22 16:38:54 -0600 |
commit | da634bfc8933619a70284077b499c82802f04ceb (patch) | |
tree | 09dbacce75f19031ee4861c9402e403e9dc078ee | |
parent | 1eb1869626cbdacbeca037fbd81d01756f2faa76 (diff) | |
download | lvm2-da634bfc8933619a70284077b499c82802f04ceb.tar.gz |
man: indicate repeatable options
Print ... after a repeatable option in the OPTIONS section.
An alternative would be to just mention in the text description
that the option is repeatable.
-rw-r--r-- | tools/command.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/command.c b/tools/command.c index d170eecd3..1a5fbb5a6 100644 --- a/tools/command.c +++ b/tools/command.c @@ -176,8 +176,8 @@ struct opt_name { char _padding[7]; const char *long_opt; /* --foo */ int val_enum; /* xyz_VAL when --foo takes a val like "--foo xyz" */ - uint32_t unused1; - uint32_t unused2; + uint32_t flags; + uint32_t prio; const char *desc; }; @@ -2617,7 +2617,6 @@ void print_man_all_options_list(struct command_name *cname) /* * All options used for a given command name, along with descriptions. - * listed in order of: */ void print_man_all_options_desc(struct command_name *cname) @@ -2656,6 +2655,9 @@ void print_man_all_options_desc(struct command_name *cname) print_val_man(val_names[val_enum].usage); } + if (opt_names[opt_enum].flags & ARG_COUNTABLE) + printf(" ..."); + if (opt_names[opt_enum].desc) { printf("\n"); printf(".br\n"); |