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

expand: fix duplicate flags #5684

Merged
merged 2 commits into from
Dec 21, 2023
Merged

Conversation

allaboutevemirolive
Copy link
Contributor

@allaboutevemirolive allaboutevemirolive commented Dec 20, 2023

Fixed expand failed when executing multiple args. See #5671

GNU:

$ echo -e "foo\tbar" | expand -i -i
foo	bar

Current uutils/coreutils:

$ echo -e "foo\tbar" | uuu expand -i -i
error: the argument '--initial' cannot be used multiple times

Usage: /home/nemesis/Documents/Github/Focus/util/coreutils/target/debug/coreutils expand [OPTION]... [FILE]...

For more information, try '--help'.

Expected behavior for uutils/coreutils:

$ echo -e "foo\tbar" | uuu expand -i -i
foo	bar

Copy link
Contributor

@cakebaker cakebaker left a comment

Choose a reason for hiding this comment

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

The change itself looks good. With the test, I think it is a bit of an overkill to introduce an additional fixture and you could simply use the fixture used in test_with_trailing_tab_i.

@allaboutevemirolive
Copy link
Contributor Author

@cakebaker Do you know why the GNU test failed? Or should I run cargo test on my machine again? :)

@uutils uutils deleted a comment from github-actions bot Dec 21, 2023
@sylvestre
Copy link
Sponsor Contributor

Just ignore it :)

@uutils uutils deleted a comment from github-actions bot Dec 21, 2023
@sylvestre sylvestre merged commit e071fd3 into uutils:main Dec 21, 2023
53 of 56 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