Repository navigation
Add rfl::cli::OptionsFirst to pass the rest of the command line through - #31
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
wave-base-7
branch
from
November 14, 2026 13:01
1d8808d to
960a0ab
Compare
clockblocker
force-pushed
the
cli-options-first
branch
from
November 14, 2026 13:01
2d6cbac to
65250dd
Compare
clockblocker
force-pushed
the
cli-options-first
branch
from
November 15, 2026 08:21
65250dd to
7f39e60
Compare
clockblocker
force-pushed
the
wave-base-10
branch
2 times, most recently
from
November 16, 2026 05:18
30b4ec4 to
b06e850
Compare
clockblocker
force-pushed
the
cli-options-first
branch
2 times, most recently
from
November 17, 2026 04:36
2f1c300 to
d5c2a1b
Compare
clockblocker
force-pushed
the
wave-base-10
branch
from
November 17, 2026 04:36
b06e850 to
bed2129
Compare
clockblocker
force-pushed
the
cli-options-first
branch
from
November 17, 2026 05:11
d5c2a1b to
cdfad9e
Compare
clockblocker
force-pushed
the
wave-base-10
branch
from
November 17, 2026 05:11
bed2129 to
d927002
Compare
clockblocker
force-pushed
the
cli-options-first
branch
from
November 17, 2026 05:17
cdfad9e to
654bb80
Compare
clockblocker
force-pushed
the
wave-base-10
branch
from
November 17, 2026 05:17
d927002 to
9267115
Compare
clockblocker
force-pushed
the
cli-options-first
branch
from
November 17, 2026 07:15
654bb80 to
1f437bd
Compare
clockblocker
force-pushed
the
wave-base-10
branch
from
November 17, 2026 07:15
9267115 to
135f510
Compare
With rfl::cli::OptionsFirst, the options end at the first positional argument, as in getopt's '+' mode. Every later token is a positional argument, taken as it is: `--x`, `-x`, unknown options and `--`. A list as the last positional field gets the rest of the command line unchanged, whatever the list delimiter: the arguments are not split at the commas, and empty ones are kept. Before the first positional argument, options work as usual, and `--` ends them and is dropped. After it, `--` is kept. A token read as a positional argument, such as `-5`, also ends the options. usage lists the options before the positional arguments in the synopsis. The setting is off by default, and other formats ignore it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
clockblocker
force-pushed
the
wave-base-10
branch
from
November 17, 2026 09:51
135f510 to
2945a05
Compare
clockblocker
force-pushed
the
cli-options-first
branch
from
November 17, 2026 09:51
1f437bd to
1f1093f
Compare
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
Adds the opt-in
rfl::cli::OptionsFirstprocessor so option parsing stops at the first positional argument and all subsequent tokens are passed through verbatim (like POSIX/getopt+mode).Example
Key details
--ends options and is dropped. After it,--,-x,--x, commas, and""are kept intact without splitting.-5) also ends options;rfl::NoExtraFieldschecks only tokens before the first positional.--args=a,bbefore the first positional still splits as a normal option.rfl::cli::usagelists options before positionals in the usage line. Docs updated incli.md.(Same
rfl::cli::Settingsvs processor API question as #30.)AI-authored. Depends on: #30, #36.