openSUSE / docmanager

Manage DocBook 5 Meta Information
http://opensuse.github.io/docmanager/index.html
GNU General Public License v3.0
6 stars 6 forks source link

usage output irritating #54

Closed fsundermeyer closed 9 years ago

fsundermeyer commented 9 years ago

The output of

> docmanager get --help
usage: docmanager COMMAND [OPTIONS] FILE [FILE ...] get [-h] [-p PROPERTIES]
                                                        [-f {table,json}]
                                                        FILE [FILE ...]

is not only strangely formatted, but also has one "FILE [FILE ...]" to much. Suggested correction:

General usage:  docmanager COMMAND [OPTIONS] FILE [FILE ...]
docmanager get: docmanager get [-p PROPERTIES]  [-f {table,json}] FILE [FILE ...]

Also applies to all other subcommands.

tomschr commented 9 years ago

@fsundermeyer Thanks Frank for the report!

I'm not sure if it is possible to add your "general usage" line into our argparse parser. The closest what we can get is this:

$ docmanager -h
usage: docmanager [-h] [--version] [-v] [--langlist]
                  {init,i,get,g,set,s,del,d,query,q,analyze} ...

and with a subcommand:

$ docmanager get -h
usage: docmanager get [-h] [-p PROPERTIES] [-f {table,json}] FILE [FILE ...]
fsundermeyer commented 9 years ago

tomschr: Your suggested solution looks fine to me!

mschnitzer commented 9 years ago

As discussed with @tomschr, we can close it here.