Skip to content

Adds --version support#206

Merged
sylvestre merged 2 commits intouutils:mainfrom
pocopepe:fix_version
Dec 14, 2025
Merged

Adds --version support#206
sylvestre merged 2 commits intouutils:mainfrom
pocopepe:fix_version

Conversation

@pocopepe
Copy link
Copy Markdown
Contributor

Closes #166

Adds missing --version/-V flag support to sed.

First PR to this org, feedback welcome!

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.56%. Comparing base (8b42f7e) to head (e64fc4b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #206   +/-   ##
=======================================
  Coverage   80.56%   80.56%           
=======================================
  Files          13       13           
  Lines        5485     5486    +1     
  Branches      301      301           
=======================================
+ Hits         4419     4420    +1     
  Misses       1064     1064           
  Partials        2        2           
Flag Coverage Δ
macos_latest 80.84% <100.00%> (+<0.01%) ⬆️
ubuntu_latest 80.99% <100.00%> (+<0.01%) ⬆️
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.

@sylvestre
Copy link
Copy Markdown
Contributor

could you please add a test to make sure we don't regress in the future? thanks

@pocopepe
Copy link
Copy Markdown
Contributor Author

Done! I've added the test case in the latest commit.

Comment thread tests/by-util/test_sed.rs
#[test]
fn test_version() {
let short = new_ucmd!()
.arg("-V")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-V isn't supported upstream

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sylvestre wouldn't it make sense to keep it as an extension? Similar to the coreutils?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok :)

@sylvestre sylvestre merged commit 45ff3eb into uutils:main Dec 14, 2025
18 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.

sed --version fails

3 participants