Is it possible, without subclassing, to have a short option without a corresponding long option?
Short answer: no.
All the "standard" arg-types take short and long flags. Can you describe a situation when it would be useful not to have a long option?
Yes: we sometimes would like to see an alias for a short option, e.g., both '-?' and '-h' for '--help'. Along the same lines we would like to be able to define some default options for our users (similar to the existing '--help' and '--version') and also turn off some (like '--version).
Another nice-to-have would be the ability to add a callback function for an option's value (default or otherwise).
We have used sub-classing for some output formatting but I had to get into more of TCLAP's guts for some things (like ignoring '--version').
We (http://brlcad.org) love TCLAP and are trying to get it to fit our needs for a common arg-parsing environment and auto-documentation ability (for over 400 command-line programs). We want to be able to have tight control over the arg-handling interface (developer and user). I will be happy to help in any way I can to get any such features added.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.