feat: add F command - #429
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #429 +/- ##
==========================================
- Coverage 82.20% 82.09% -0.12%
==========================================
Files 13 13
Lines 5542 5550 +8
Branches 310 312 +2
==========================================
Hits 4556 4556
- Misses 983 991 +8
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 5.62%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | genome_subst |
215.5 ms | 209.8 ms | +2.7% |
| ❌ | number_fix |
517.8 ms | 597 ms | -13.26% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing MukundaKatta:codex/add-f-command (677e524) with main (f083fa0)
dspinellis
left a comment
There was a problem hiding this comment.
Thanks! Please address the comments, rebase, squash, and ask for another review.
| pub input_name: String, | ||
| /// Currently processed input file name as supplied, for commands that | ||
| /// print it directly. | ||
| pub raw_input_name: String, |
There was a problem hiding this comment.
I see no reason for a second name.
| @@ -204,6 +204,7 @@ fn build_context(matches: &ArgMatches) -> ProcessingContext { | |||
|
|
|||
| // Other context | |||
| input_name: "<stdin>".to_string(), | |||
There was a problem hiding this comment.
It think this should now be OsString (see other examples in the code).Using - rather than <stdin> is OK.
Summary
Fcommand outside POSIX mode-z, and POSIX rejectionFixes #393.
Tests
cargo fmt --checkcargo test pattern_print_filename_with_f_commandcargo test test_sedcargo testcargo run --quiet -- -n 'F' tests/fixtures/sed/input/lines1 | head -n 3