Closed mastermindg closed 7 years ago
mastermindg,
Not sure what your use case is. If you really need help to display, you can try this. It displays an option-specific help screen:
unless options.prefix
command(:help).run(:test)
raise ArgumentError.new('Prefix is required!')
end
Please note, this is not a public (published) option. I dug this out of the commander source code. Commander out-of-the-box is pretty complete and rethinking my uses has helped me a lot. You might want to seriously review your use case as this solution may not be very portable.
I am not a developer but a retired old-school network specialist. Take this with several grains of salt and a pint of good brew.
Lewis
It seems like @lebogan 's workaround would do the trick. Closing the issue
I have a command with a required option. How can I display the help page to the user if this option is not set?: