Repository navigation
Accept repeated list options in rfl::cli - #26
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
clockblocker
force-pushed
the
cli-repeated-lists
branch
from
November 14, 2026 13:01
b58e0f1 to
f80781a
Compare
clockblocker
force-pushed
the
wave-base-5
branch
from
November 14, 2026 13:01
06b7ba6 to
ebe522c
Compare
clockblocker
force-pushed
the
cli-repeated-lists
branch
2 times, most recently
from
November 16, 2026 05:18
f296f14 to
23e703b
Compare
clockblocker
force-pushed
the
wave-base-7
branch
from
November 16, 2026 05:18
2f4fc2e to
049151c
Compare
clockblocker
force-pushed
the
cli-repeated-lists
branch
from
November 17, 2026 04:18
23e703b to
c89a640
Compare
clockblocker
force-pushed
the
wave-base-7
branch
2 times, most recently
from
November 17, 2026 05:11
ce84e34 to
37ee897
Compare
clockblocker
force-pushed
the
cli-repeated-lists
branch
2 times, most recently
from
November 17, 2026 07:15
03b1be2 to
713631b
Compare
clockblocker
force-pushed
the
wave-base-7
branch
2 times, most recently
from
November 17, 2026 09:34
385e359 to
417c86b
Compare
clockblocker
force-pushed
the
cli-repeated-lists
branch
from
November 17, 2026 09:34
713631b to
d1cc0ba
Compare
A list field (vector, set, std::array, tuple, pair, ... through any wrapper) now takes every occurrence of its option, long or short: each occurrence is split at the commas and the items are added in argv order, so `--report=a,b --report=c` gives [a, b, c]. Any other option still fails when repeated, with the same messages. The option table marks list options (Option::is_list). parse_argv keeps a list's first occurrence in `named` under its long name and the later ones in ParsedArgs::later_occurrences; the overload of resolve_args that takes the table returns them beside the flat map (internal::ResolvedArgs), and the Reader adds their items. The public resolve_args<T> keeps its flat-map result. Without rfl::NoExtraFields the table lists only the top-level fields, so parse_argv looks up nested options in the table of all paths, built the first time one is given. usage marks list options "Can be repeated.". Only inputs that used to fail change meaning. Co-Authored-By: Claude Opus 5.5 <[email protected]>
clockblocker
force-pushed
the
cli-repeated-lists
branch
from
November 17, 2026 09:44
d1cc0ba to
549792e
Compare
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allows list options in
rfl::cli::readto be repeated across multiple flags (--report=a --report=b), appending items in argv order instead of failing withDuplicate argument. Purely additive.Example
Key details
std::array, tuples, pairs, nested lists (--database.replicas), map-value lists, and wrapped fields; empty occurrences (--report=) add nothing.rfl::cli::usageappendsCan be repeated.to list option rows.resolve_args<T, Ps>keeps its signature and flat-map return type (rejecting repeated options as before).cli.md("Lists and repeated options").AI-authored. Depends on: #24, #25, #35, #39.