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

ls: make --block-size and --human-readable/--si override each other #5641

Merged
merged 2 commits into from Dec 14, 2023

Conversation

cakebaker
Copy link
Contributor

This PR makes --block-size and --human-readable/--si override each other to match the behavior of GNU ls.

@tertsdiepraam
Copy link
Member

Excellent! A related problem is:

> ls --human-readable --human-readable
error: the argument '--human-readable' cannot be used multiple times

Usage: target/debug/coreutils ls [OPTION]... [FILE]...

I think it should use https://docs.rs/clap/latest/clap/struct.Command.html#method.args_override_self

But feel free to merge without that.

@cakebaker
Copy link
Contributor Author

Good point, I enabled it in the latest push.

@tertsdiepraam tertsdiepraam linked an issue Dec 14, 2023 that may be closed by this pull request
@tertsdiepraam tertsdiepraam merged commit 66bd065 into uutils:main Dec 14, 2023
54 of 55 checks passed
@cakebaker cakebaker deleted the ls_block_size_si_human_readable branch December 14, 2023 16:05
@tertsdiepraam
Copy link
Member

Great! :)

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.

ls: Don't reject multiple use of --color
2 participants