Actions
Feature #16256
closed
A "did you mean" hint for OptionParser
Feature #16256: A "did you mean" hint for OptionParser
Added by mame (Yusuke Endoh) almost 7 years ago. Updated almost 7 years ago.
Description
How about showing "did you mean" when a unknown option is passed for OptionParser?
require 'optparse'
OptionParser.new do |opts|
opts.on("-f", "--foo", "foo") {|v| }
opts.on("-b", "--bar", "bar") {|v| }
opts.on("-c", "--baz", "baz") {|v| }
end.parse!
Actions