The Options.help method adds the -h and --help options to your command. These options can be used to print a help message.
Options.help
-h
--help
class Command < Cli::Command class Options help # equivalent to on(%w(-h --help)) { command.help! } end end
You can change the option's name:
class Command < Cli::Command class Options help "--show-help" end end
The Options.version method adds the -v and --version options to your command. These options can be used to print a version string.
Options.version
-v
--version
class Command < Cli::Command class Options version # equivalent to on(%w(-v --version)) { command.version! } end end
class Command < Cli::Command class Options version "--show-version" end end
There was an error while loading. Please reload this page.