Module: Dry
- Defined in:
- lib/space_core/cli/help.rb,
lib/space_core/cli/repeatable_options.rb
Overview
dry-cli (1.4.x) treats ‘type: :array` options as comma-separated and OVERWRITES on each occurrence, so `-r a -r b` yields [“b”]. We want repeated flags to accumulate (`-r a -r b -r c` => [“a”, “b”, “c”]) the way git/docker-style CLIs do, while still accepting the comma form. dry-cli exposes no hook for this, so we reopen two private seams, each mirroring dry-cli 1.4.1 with a single change:
* Parser.call — concat instead of assign for array options.
* Banner.extended_command_options — drop the "=VALUE1,VALUE2,.." hint that
advertised the comma form as the only way; show the plain repeatable flag,
matching how you actually type it (-r VALUE).
These mirror the released 1.4.1 source EXACTLY (not the dry-rb main branch, which already differs). Pinned via ‘~> 1.4`; if a future dry-cli reworks these methods, repeatable_options_test goes red and we re-sync. Rationale: notes/ruby-cli-gems-report.md.
Defined Under Namespace
Classes: CLI