commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <org.apache.comm...@io7m.com>
Subject [cli] naming trailing arguments for help messages
Date Tue, 27 Aug 2013 11:31:57 GMT
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


Mime
View raw message