Skip to content

uucore: keep numeric-looking arguments verbatim in clap errors - #15706

Merged
sylvestre merged 2 commits into
uutils:mainfrom
TanbirRamim:clap-literal-args
Oct 25, 2026
Merged

sylvestre merged 2 commits into
uutils:mainfrom
TanbirRamim:clap-literal-args

Conversation

@TanbirRamim

Copy link
Copy Markdown
Contributor

Part of #15533, the clap row of the table.

The shared clap error handler passed the offending argument/value through translate!, so Fluent turned it into a number. uname 007 said unexpected argument '7' found and ls --format=007 said invalid value '7'. Switched those three call sites to translate_text! like the other fixes for this issue.

Added tests in test_uname and test_ls, both fail on main and pass with the change. dd is the only other leftover from the table, not touched here.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 22:50

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.


use crate::error::{UResult, USimpleError};
use crate::locale::translate;
use crate::translate_text;

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.

could be use crate::locale::{translate, translate_text};, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yep, done, thanks

Copilot AI balanced review requested due to automatic review settings October 24, 2026 13:16

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Copilot AI balanced review requested due to automatic review settings October 24, 2026 16:27

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@sylvestre
sylvestre merged commit 732b9c5 into uutils:main Oct 25, 2026
190 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

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.

3 participants