-
-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow user defined help string at CommandSpec.add_help() #2535
Conversation
packages/cli/command_spec.pony
Outdated
@@ -79,12 +80,13 @@ class CommandSpec | |||
if _args.size() > 0 then error end | |||
_commands.update(cmd.name(), cmd) | |||
|
|||
fun ref add_help(hname: String = "help") ? => | |||
fun ref add_help(hname: String = "help", hinfo: String = "Print help page") ? => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe i should leave this default to empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd suggest to rename hinfo
to descr'
to accomodate to the API of OptionSpec
and maybe keep a default one of display this help and exit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should default to empty for this to be considered a "non-breaking change".
Thank you very much! |
* Allow user defined help string at CommandSpec.add_help() * Rename hinfo to descr',and leave it empty
In package cli at command_spec.pony: