eza-community / eza

A modern alternative to ls
https://eza.rocks
European Union Public License 1.2
12.52k stars 220 forks source link

feat: consider using binary size units by default #1174

Open matklad opened 1 month ago

matklad commented 1 month ago

By default, eza's M is 1000KB, not 1024KiB. This probably doesn't matter for the majority of the cases, but it is extremely confusing if you do need to know precise size of the file. I can't back that up, but my gut feeling is that 9 out of 10 people upon seeing

.rwxr-xr-x@ 132M matklad 30 Sep 14:34  tigerbeetle

would interpret that as 132MiB, not as 132MB. I definitely was mightily confused over this today!

cafkafk commented 1 month ago

we do have the --binary flag, but we perhaps should consider using the full unit name for the default case regardless of whether or not to change it. For what it's worth, the M prefix should be 1000 units of something, so in that sense we shouldn't report M as MiB.

I wonder if the community has any input for this.

cafkafk commented 1 month ago

@matklad would you have been confused if we had the units MB instead of M?

matklad commented 1 month ago

I probably would have been, yeah! Until writing this issue, I actually didn't fully realize that the official SI unit abbreviation is MB and not M (it's obvious in retrospect, but I just never thought about that)

mrmarkwell commented 1 month ago

+1 to this being confusing. I just spent a while trying to figure out why a Google drive file that was 2.9GB suddenly became 3.1 when I downloaded it. Defaulting to the binary interpretation of file sizes seems appropriate for a tool largely used by software developers and IT folks. In any case, thanks for the great tool!