#1091768 coreutils: numfmt: --format should exclude --padding (like --grouping)

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2024-12-31 04:27:02 UTC
Severity:
normal
#1091768#5
Date:
2024-12-31 04:22:55 UTC
From:
To:
Dear Maintainer,

$ numfmt --format a%fc --grouping
numfmt: --grouping cannot be combined with --format
$ numfmt --to iec --format a%\'fc 10
numfmt: grouping cannot be combined with --to
$ numfmt --to iec --format a%fc --grouping 10
numfmt: --grouping cannot be combined with --format

So, clearly, --grouping is the same thing as the ' in --format
(why both flags are there eludes me, but whatever).

So is --padding and numbers in --format,
except it isn't excluded by --format:

$ echo "_$(numfmt --format a%20fc --padding 50 10)_"
_a                  10c_

So this result is wrong.

Since both --grouping and --padding are used to synthesise --format,
both ought to be excluded by --format.

Best,