Euphoria
Ticket #457:
cmdline.e hard codes 'h', '?', and 'help'
-
Reported by
DerekParnell
Nov 29, 2010
The command line switches 'h', '?', and 'help' are always included in the switches for a program, and they are always linked to the help functionality.
- I suspect that if the user supplies alternative switches for the help display then the default switches should not be included.
- There doesn't seem to be an obvious way to tell cmd_parse() that there is no help for the application.
Details
1. Comment by jeremy
Nov 29, 2010
They are hard coded as the help options, however the user can override any of them by giving HELP as an option to their parameter. i.e.
sequence opts = {
{ 0, "display-help", "Display the help message", { NO_PARAMETER, HELP } }
}
This will cause h, ? and help options to not be added and cause the display-help parameter to display the help screen.
Is this ticket to make the h, ? and help parameters be user changeable in some other fashion?
2. Comment by DerekParnell
Nov 30, 2010
The automatic switches -h, -? and --help are now excluded if (respectively) that are explicitly defined in the options.
This means that if you define "-h" to calculate a hash for example, then "-h" will not be automatically assigned to show the help info.
Also, the NO_HELP parse_option is now used just to avoid assigning all this switches to the help display.