4

It is possible to retrieve positional parameters in Apache Commons CLI. Is it possible to name them for the usage statement? To be concrete, the Apache Commons CLI documentation gives an ls Example:

Usage: ls [OPTION]... [FILE]...

How could I use a HelpFormatter to output "[FILE]..." when calling HelpFormatter.printHelp(..., autoUsage = true)? These are the values returned by CommandLine.getArgs(). I know how to name Option arguments in a usage message but not how to name such positional arguments.

Rhys Ulerich
  • 1,242
  • 1
  • 12
  • 28

0 Answers0