Skip to content

fix: allow commands before closing brace#427

Open
MukundaKatta wants to merge 1 commit into
uutils:mainfrom
MukundaKatta:codex/fix-brace-command-terminator
Open

fix: allow commands before closing brace#427
MukundaKatta wants to merge 1 commit into
uutils:mainfrom
MukundaKatta:codex/fix-brace-command-terminator

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary

  • accept } as a command terminator without consuming it, so the group-close handler can still process the brace
  • add a regression test for {p}, 1{p}, and /a/{p} scripts

Fixes #392.

Tests

  • cargo fmt --check
  • cargo test command_may_end_before_closing_brace
  • cargo test test_sed
  • cargo test
  • cargo run --quiet -- '{p}' <<<'a'

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.18%. Comparing base (f083fa0) to head (7249fb7).

Files with missing lines Patch % Lines
src/sed/compiler.rs 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #427      +/-   ##
==========================================
- Coverage   82.20%   82.18%   -0.03%     
==========================================
  Files          13       13              
  Lines        5542     5545       +3     
  Branches      310      311       +1     
==========================================
+ Hits         4556     4557       +1     
- Misses        983      984       +1     
- Partials        3        4       +1     
Flag Coverage Δ
macos_latest 82.86% <33.33%> (-0.03%) ⬇️
ubuntu_latest 82.97% <33.33%> (-0.03%) ⬇️
windows_latest 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 15, 2026

Merging this PR will improve performance by 2.85%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 10 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
genome_subst 215.5 ms 209.5 ms +2.85%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing MukundaKatta:codex/fix-brace-command-terminator (7249fb7) with main (f083fa0)

Open in CodSpeed

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.

} not accepted as a command terminator

1 participant