Closed evannorstrand closed 6 years ago
Yes, the following will do what you want:
command :mycommand do |c|
c.option '--something', 'Some switch that does something'
c.action do |args, options|
puts options.some_switch # this will be true when the switch is provided and nil otherwise
end
end
Can this be documented in the README somewhere?
If you'd like to take a stab at a pull request to add it to the readme that'd be great!
I would like to run a command that works like this:
command --foo true --bar true
but look like this:
command --foo --bar
Is this possible?