Re: Command line help options
- Posted by jeremy (admin) Nov 29, 2010
- 1517 views
Are -h and -? hardcoded? What about if I don't want a help option? Documentation is not clear about that.
Yes they are hardcoded. I don't think that they were meant to be though. I'll raise a ticket about this.
They are not hard coded. Here are two examples:
This sets a user defined help option "--get-help", no h, ? or help options are added and the --get-help option triggers the normal help screen.
sequence opts = { { 0, "get-help", "Display the help message", { NO_PARAMETER, HELP } } } cmd_parse(opts)
This example shows how cmd_parse can be used with no help at all, not user and not cmd_parse added. This, however, will only work after the bug fix in svn:4341. Thus, this will not work on RC1. Once RC2 is released, it will begin functioning for everyone.
sequence opts = { ... } cmd_parse(opts, NO_HELP)
This is how it was designed to work but somewhere along the line the NO_HELP was either removed from processing or not kept when modifications were added. I didn't research to see why it quit working. The important thing is it now works.
Jeremy