Modify usage according to contraints
Brought to you by:
atownley
Hi,
I was wondering if it would be possible to have the
displayed usage tailored according to the contraints added?
For example, if I have my 'program', with a mandatory
option called 'name' and execute it like this:
bash#program
I get the message:
error: option 'name' is required. Exiting.
Usage: program [-n|--name <arg>]
Since 'name' is not optional, ideally the usage would show:
error: option 'name' is required. Exiting.
Usage: program -n|--name <arg>
You could imagine more complicated scenarios when at
last one option of a group is mandatory.
Thanks,
JP
Logged In: YES
user_id=829770
Doh, didn't mean to put in an anonymous request.
Feel free to contact me if I can clarify the above.
Thanks