Skip to content

tr: word the -ds missing-operand hint the way GNU does - #14873

Merged
sylvestre merged 1 commit into
uutils:mainfrom
Socialpranker:tr-ds-missing-operand-wording
Sep 26, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
Socialpranker:tr-ds-missing-operand-wording

Conversation

@Socialpranker

@Socialpranker Socialpranker commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Split out of #14400 as requested there.

$ tr -ds a-z
tr: missing operand after 'a-z'
Two strings must be given when both deleting and squeezing repeats.   # GNU
Two strings must be given when deleting and squeezing.                # uutils, before

The second line of tr-error-missing-operand-deleting-squeezing now reads the way GNU prints it. The fr-FR string is reworded to match. The existing test_delete_and_squeeze_one_set assertion is updated.

GNU behavior established by running the installed GNU coreutils 9.11 binary (gtr) as a black box; I did not read GNU source.

Testing

  • cargo test --no-default-features --features tr --test tests test_tr: 160 passed, 0 failed.
  • cargo fmt --check: clean.

Disclosure

Prepared with AI assistance (Claude Opus 5.5, via Claude Code), per the AI policy in CONTRIBUTING.md. All testing was run locally.

@anastygnome

Copy link
Copy Markdown
Contributor

GNU has been updated, can you retest

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)

@sylvestre
sylvestre merged commit f281793 into uutils:main Sep 26, 2026
137 of 138 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.

3 participants