Felipe Contreras
2021-05-26 20:55:14 UTC
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] https://travis-ci.com/github/felipec/ruby-parseopt
[3] https://www.rubydoc.info/gems/parseopt/0.3.1
[4] https://github.com/felipec/ruby-parseopt
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] https://travis-ci.com/github/felipec/ruby-parseopt
[3] https://www.rubydoc.info/gems/parseopt/0.3.1
[4] https://github.com/felipec/ruby-parseopt
--
Felipe Contreras
Unsubscribe: <mailto:ruby-talk-***@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
Felipe Contreras
Unsubscribe: <mailto:ruby-talk-***@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>