Repository navigation
df: let the last of -B, -h, -H, -k and -m win, like GNU - #15848
Open
TanbirRamim wants to merge 1 commit into
Open
TanbirRamim wants to merge 1 commit into
TanbirRamim wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In GNU df,
-B,-h,-H,-kand-moverride each other and the last one on the command line wins. uutils always let-h/-Hwin, sodf -h -B 1Kstill printed human sizes.This came up while looking at a Copilot note on #14522 (
--total -h --block-size=...).Checked against GNU df 9.11 (
--output=size):-h -B 1K-B 1K -h-h -k-H -k-k -H-h -m-m -hThe fix just puts all five options in one
overrides_with_alllist, so clap keeps the last one.BLOCK_SIZE/DF_BLOCK_SIZEstill lose to-hlike before (same as GNU).Added two tests: one for the header in each order, and one that checks
-h -B 1really prints a plain number, not just the right header. Both fail on main.