Skip to content

fix(builtins): parse combined short flags in paste builtin#1045

Merged
chaliy merged 3 commits intomainfrom
fix/issue-965-paste-combined-flags
Apr 4, 2026
Merged

fix(builtins): parse combined short flags in paste builtin#1045
chaliy merged 3 commits intomainfrom
fix/issue-965-paste-combined-flags

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 3, 2026

Summary

  • Fix paste -sd, being treated as a filename instead of combined flags -s -d,
  • Added try_parse_combined_flags() to iterate through combined flag characters
  • s sets serial mode, d consumes remainder as delimiter spec

Test plan

  • paste_combined_flagsprintf "a\nb\nc\n" | paste -sd, outputs a,b,c
  • paste_combined_flags_serial_onlypaste -s works
  • paste_separate_flagspaste -s -d , still works
  • Unit tests for -sd, and -sd: variants
  • All existing paste tests pass

Closes #965

@chaliy chaliy merged commit 19141c3 into main Apr 4, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-965-paste-combined-flags branch April 4, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

paste builtin does not parse combined short flags (-sd,)

1 participant