Sven Köhler [2023-11-26 17:09:23 +0100]:
> So Pádraig's patch does allow for parsing lowercase k, but it does not
> change numfmt to use lowercase k in its output in si mode.
>
> As Pádraig has shown, ls uses lowercase k in --si mode. So it uses lowercase
> k for 1000. I think that numfmt should
On 26/11/2023 16:09, Sven Köhler wrote:
So Pádraig's patch does allow for parsing lowercase k, but it does not
change numfmt to use lowercase k in its output in si mode.
As Pádraig has shown, ls uses lowercase k in --si mode. So it uses
lowercase k for 1000. I think that numfmt should behave
So Pádraig's patch does allow for parsing lowercase k, but it does not
change numfmt to use lowercase k in its output in si mode.
As Pádraig has shown, ls uses lowercase k in --si mode. So it uses
lowercase k for 1000. I think that numfmt should behave the same for
consistency reasons.
On 25/11/2023 21:27, Sven Köhler wrote:
Not only --from=si is broken. Also --to=si is broken:
$ numfmt --to=si 3000
3,0K
In order to not break backwards compatibility, you probably have to
introduce a switch --lowercase-kilo such that --to=si produces proper SI
compliant output. Then have
Not only --from=si is broken. Also --to=si is broken:
$ numfmt --to=si 3000
3,0K
In order to not break backwards compatibility, you probably have to
introduce a switch --lowercase-kilo such that --to=si produces proper SI
compliant output. Then have --from=si accept both uppercase and
Hello,
the SI prefix for 'a thousand' is a lowercase k and not an uppercase K [1].
The default behavior of numfmt with '--from=si' option is therefore
contrary to expectation:
$ numfmt --from=si
500k# Should be accepted as valid SI
numfmt: invalid suffix in input: ‘500k’
$ numfmt