Actions
Bug #7498
closedOptparse does not complete argument when used with :REQUIRED
Description
#!/usr/bin/env ruby
require 'optparse'
OptionParser.new do |opts|
opts.on(:REQUIRED, "--bug", ["foo", "bar"]) do |v|
puts v
end
opts.on(:REQUIRED, "--nobug ARG", ["foo", "bar"]) do |v|
puts v
end
end.parse!
./bug.rb --bug b
b
./bug.rb --nobug b
bar
As you can see, using "--bug" with :REQUIRED but without specifying the obligatory argument name, the argument to "--bug" does not get completed to the value in the array.
Actions
Like0
Like0Like0