It would maybe be sensible to have instead a structure in which we can load every parameter and their descriptions, in order to have an automated --help option :
GetOpt getOpt = new GetOpt( "in", &inFile, "Input file (Raw data)", "out", &outFile, "Output file (XML data)" ) ;then an arg "--help" would print :
--help : this help --in <string> : Input file (Raw data) --out <string> : Output file (XML data)etc.
Hint at use of single letter and multiple name options with "verbose|v".
Currently long option syntax is accepted for single letter options (e.g. --v). Perhaps this is a bug. If not, would like option to disallow it.
- Corresponding page in the D Specification
- POSIX getopt for Phobos
- Return value for "bool getopt(T...)(ref string args, T opts);"