Hello,
I've been using this option parser for many years in multiple projects,
and I've finally decided to make it a gem.
It uses as inspiration Git's internal option parser, and also Ruby's
OptionParser.
The reason I don't use OptionParser is that it's not possible to pass
arguments as-is to another program (e.g. git log --no-merges -- README).
See issue #8460.
It's really simple:
opts = ParseOpt.new('my command')
opts.on('b') { $bool = true }
opts.parse
I have tests [2], and documentation [3].
Any feedback is appreciated in the GitHub project [4].
Cheers.
[1] https://redmine.ruby-lang.org/issues/8460
[2] Travis CI - Test and Deploy with Confidence
[3] File: README — Documentation for parseopt (0.3.1)
[4] GitHub - felipec/ruby-parseopt: A simple yet powerful option parser
···
--
Felipe Contreras