utdemir / nix-tree

Interactively browse dependency graphs of Nix derivations.
BSD 3-Clause "New" or "Revised" License
699 stars 11 forks source link

Feature Request: ISO units for size (MB, GB) #94

Open Schweber opened 3 months ago

Schweber commented 3 months ago

I would like to have the sizes displayed in ISO/base 10 units (MB, GB, TB). All programs on my system use these units and it would be nice if i could set nix-tree to do the same, so that i have a homogenous display.

Could you please add a flag for that?

utdemir commented 3 months ago

I had never spent much thought to it - so though I'm happy to have the flag, what would be the pros/cons of switching to ISO units everywhere unconditionally? Do you think there's value keeping both - or should we just change them to ISO without any flags for the existing behaviour?

Schweber commented 3 months ago

While ISO units technically are the standard, in the end it's a matter of habit and preference. I guess that if you change to ISO units unconditionally, you will upset some users.

If i were to decide, i would set ISO units as the default and provide a flag that changes to base 2 units. I'm fine with either solution, but please use a flag and not some keybind inside the program that one would have to press every time nix-tree is launched to get ones preferred setting.