slop icon indicating copy to clipboard operation
slop copied to clipboard

Simple Lightweight Option Parsing - ✨ new contributors welcome ✨

Results 8 slop issues
Sort by recently updated
recently updated
newest added

RubyGems.org no longer uses test_files for anything.

Create a parser with a single boolean flag, `-t`/`--test`, with a default value of `true`. When parsing an empty command, both `opts['test']` and `opts.test?` should return `true`. Only `opts['test']` returns...

Just using the example I found some bugs: ```sh $ bin/example -l --port ``` Returns 80, the default, which is a bug, because it should return an error because of...

I think we should fix this but we should also enable frozen strings in Slop using the `# frozen_string_literal: true` pragma _Originally posted by @leejarvis in https://github.com/leejarvis/slop/issues/255#issuecomment-689370633_

Implements: ```ruby opts = Slop.parse do |o| o.separator 'Check which definition questions does not have answers yet.' o.separator 'Options:' o.int '-o', '--option', 'some option', required: true o.on_error do puts o;...

Excellent library, I use it a lot. Thanks for sharing it! This is not really a bug. I just didn't expect the behavior. Consider this: ``` o = Slop::Options.new o.string...

Display an example variable in help to distinguish boolean flags from options with arguments.

By rewriting parse to accumulate arguments as we go, we can easily add a condition to stop parsing when a subcommand is detected.