csplit: accept a hyphen-leading --suffix-format value - #14320
Merged
cakebaker merged 1 commit intoAug 31, 2026
Merged
Conversation
--suffix-format's value was rejected as an unrecognized flag when given as its own argument (csplit --suffix-format -%02d f /pat/, not the attached -b-%02d or --suffix-format=-%02d): the Arg was missing allow_hyphen_values, the same gap already fixed this session for several other options (sort --parallel, nl's numeric options, ptx --gap-size/--width, join -t). GNU's own --suffix-format accepts any argument as the format string regardless of its first character. AI-assisted-by: Claude Opus 5, via Claude Code
|
GNU testsuite comparison: |
Contributor
|
Thanks! |
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.
What
--suffix-format's value was rejected as an unrecognized flag whengiven as its own argument:
The attached forms (
-b-%02d,--suffix-format=-%02d) alreadyworked; only the separate-argument form broke -- the same
allow_hyphen_valuesgap already fixed this session for several otheroptions (
sort --parallel,nl's numeric options,ptx --gap-size/--width,join -t).Testing
cargo test -p uu_csplit/ fulltests/by-util/test_csplit.rssuite: 93 passed, 0 failed.--suffix-format -%02dand--suffix-format=z%02d(both output and the resulting filenames) against GNU csplit 9.11 underLC_ALL=C.cargo clippy -p uu_csplit --all-targets -- -D warningsandcargo fmt --check: clean.This PR was written with AI assistance (Claude Opus 5, via Claude Code). I've tested the changes but please review the code carefully.