You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by or...@io7m.com on 2013/08/27 13:31:57 UTC

[cli] naming trailing arguments for help messages

Hello.

Is it possible to give names to the arguments not processed by CLI for
the purposes of help messages?

As an example, I have a program that takes an '-o' argument, and then
an unbounded number of files as arguments after the initial options. I'd
like the help message to read:

$ ./c
usage: c [-h] [-o output] file [file0 .. fileN]
    -h,--help                  Show this help message
    -o,--output <directory>    Output to the given directory

But as far as I can tell from the documentation, I can only get CLI to
give me:

$ ./c
usage: c [-h] [-o <directory>]
    -h,--help                  Show this help message
    -o,--output <directory>    Output to the given directory

Which is a vaguely misleading help message...

M

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org