Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tr: Correctly handle multiple appearances of flag-args #6006

Merged
merged 5 commits into from
Feb 25, 2024

Conversation

BenWiederhake
Copy link
Collaborator

Before:

$ echo abbbcddd | tr -tt abc x  # GNU
xbbbcddd
$ echo abbbcddd | cargo run tr -tt abc x
error: the argument '--truncate-set1' cannot be used multiple times

Usage: target/debug/coreutils tr [OPTION]... SET1 [SET2]

For more information, try '--help'.
[$? = 1]
$

After:

$ echo abbbcddd | cargo run tr -tt abc x
xbbbcddd

This fixes #5998 for the special case of tr.

@BenWiederhake
Copy link
Collaborator Author

Changes since last push:

  • Marked "-scsc" as spell-checker:disable-line. This spell-checker is very noisy :(
  • Nothing else

@sylvestre
Copy link
Contributor

thanks

@sylvestre sylvestre merged commit 1748645 into uutils:main Feb 25, 2024
62 checks passed
@BenWiederhake BenWiederhake deleted the dev-tr-multi-arg branch February 25, 2024 10:45
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.

Allow repeated flags much more often
2 participants