davetron5000 / optparse-plus

Start your command line scripts off right in Ruby
http://davetron5000.github.com/optparse-plus
Apache License 2.0
521 stars 54 forks source link

Repeated options #118

Closed luc-j-bourhis closed 3 years ago

luc-j-bourhis commented 6 years ago

I would like foo --bar first --bar second --bar third to result in options[:bar] == %w(first second third). Methadone doesn't support that out of the box, does it?

davetron5000 commented 6 years ago

I don’t belive it does. Ultimately, methadone uses Ruby’s OptionParser, so to get an array, you’d do:

on(“bar”,Array)

And to invoke it:

> foo --bar=first,second,third