Skip to content

feat(sed): grouped commands, branching, Q quit, step/zero addresses#227

Merged
chaliy merged 1 commit intomainfrom
claude/bashkit-bash-compatibility-BsDKD
Feb 23, 2026
Merged

feat(sed): grouped commands, branching, Q quit, step/zero addresses#227
chaliy merged 1 commit intomainfrom
claude/bashkit-bash-compatibility-BsDKD

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 23, 2026

Summary

  • Implement {cmd1;cmd2} grouped command blocks with address support
  • Add Q (quiet quit), b/t/:label branching, step addresses (0~2), 0,/pattern/ addressing
  • Refactor execution loop with LineState struct and exec_sed_cmd helper
  • Remove all 7 sed skip markers — all sed spec tests now pass (75/75)
  • Add 9 new spec tests covering positive and negative cases

Test plan

  • All 75 sed spec tests pass (0 skipped, was 7 skipped)
  • Full test suite passes (cargo test --all-features)
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo fmt --check clean

- Implement {cmd1;cmd2} grouped command blocks with address support
- Add Q (quiet quit) command - exits without printing current line
- Add branch commands: b (unconditional), t (on substitution), :label
- Add step addresses (first~step, e.g. 0~2 for even lines)
- Add 0,/pattern/ addressing (match from start to first occurrence)
- Refactor execution loop: extract exec_sed_cmd helper, track line state
  in LineState struct, fix p command to snapshot output immediately
- Remove all 7 sed skip markers - all sed spec tests now pass
- Add 9 new spec tests covering grouped commands, branching, Q, step
  addresses, and 0,/pattern/ addressing (positive and negative cases)
- Update specs/009-implementation-status.md
@chaliy chaliy merged commit 0829f85 into main Feb 23, 2026
16 checks passed
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.

2 participants