Skip to content

wc: fix arguments not overriding#5671

Merged
sylvestre merged 3 commits intouutils:mainfrom
Yykz:wc_args_override
Dec 18, 2023
Merged

wc: fix arguments not overriding#5671
sylvestre merged 3 commits intouutils:mainfrom
Yykz:wc_args_override

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
@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