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

wc: fix arguments not overriding #5671

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Conversation

Yykz
Copy link
Contributor

@Yykz Yykz commented Dec 18, 2023

Made wc arguments override to match GNU wc behavior.

current uutils/coreutils:

$ echo "foo"|./coreutils wc -ll -l
error: the argument '--lines' cannot be used multiple times
$ echo "foo"|./coreutils wc --total=always --total=never
error: the argument '--total <WHEN>' cannot be used multiple times

GNU:

$ echo "foo"|wc -ll -l
1
$ echo "foo"|wc --total=always --total=never
      1       1       4

@sylvestre
Copy link
Contributor

Looks good but could you please add a test to make sure we don't regress ?

@Yykz
Copy link
Contributor Author

Yykz commented Dec 18, 2023

Looks good but could you please add a test to make sure we don't regress ?

Sure

@sylvestre sylvestre merged commit ece9e91 into uutils:main Dec 18, 2023
52 of 56 checks passed
@sylvestre
Copy link
Contributor

thanks

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.

2 participants