[ovs-dev] [PATCH] command-line: Add function to print all options.

Alex Wang alexw at nicira.com
Thu Oct 16 22:30:15 UTC 2014


On Thu, Oct 16, 2014 at 3:20 PM, Ben Pfaff <blp at nicira.com> wrote:

> I understand now.
>
> I agree that it makes sense to have a way to print the usage in an
> easily parsed way.  But I don't think that making --help and "help" do
> different things is a good distinction, because both forms are common
> ways to get a program to give human-readable help.  How about using a
> different word that is not in as common use, such as a "usage"
> command?
>
> I think this is OK, then.
>


Sure, the reason I tried using 'help' was that the 'ovs-appctl help' prints
the
usages.~  And I did notice that for other commands, the --help and help do
the same thing.

Anyway, I'll use 'print-format' as the subcommand name, since there is
already a 'usage()'.




> It might be possible to have the command-line code parse "usage" so
> that min_args and max_args do not have to be specified.  That is not
> necessary as part of a first patch, but it might be a nice refinement
> later.


Yeah, I'll keep it in my note.



More information about the dev mailing list