mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #185] Vertically align size numbers by decimal point #79
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eugenesvk on GitHub (Sep 21, 2021).
Original GitHub issue: https://github.com/bootandy/dust/issues/185
Currently all numbers are right-aligned, so
2appears to be bigger than11as it occupies more spaceA better version would look like this, where it's immediately apparent that
11is bigger than2since it's aligned by the decimal point@bootandy commented on GitHub (Sep 24, 2021):
I think you raise a good point here. This is worth looking into
What do you think it should do if after the 11 M file there was a 11G file? How do we highlight the 11G is 1000 times bigger than the 11M.
One option is to display Bytes everywhere and then the numbers naturally get larger.
Do you think this would look weird as the numbers don't line up ?
@eugenesvk commented on GitHub (Sep 24, 2021):
You do it with custom prefixes https://github.com/bootandy/dust/issues/184#issuecomment-926170025, where you could have
kmG(and in a proportional font you'd even have a nice differentiation between wider=bigger m and narrower=smaller k)
Custom prefixes would also allow to move the prefix around by adding more spaces to make it stand out (btw, it'd be nice to have a space between a number and a prefix as currently they're glued together, which doesn't look nice)
0k(one space separator)0m(one space separator)0G(two spaces)or make it
Gb, also highlights the difference right awaykmGbOr you can use bold G or use a different color
or
Not really, though I can achieve the same goal of differentiation with a smaller footprint, so I do prefer that
That might be the worst option as it introduces a lot of useless numbers (especially if someone forgets to use thousand separator marker), but some might like it just fine
@bootandy commented on GitHub (Nov 6, 2021):
I tried this with this PR:
https://github.com/bootandy/dust/commit/a2101d89acc723966e92a918c199d17fcac9ea9a
But I'm not really convinced its 'right'
@bootandy commented on GitHub (Nov 6, 2021):
An alternative: I have a build with 'double bars' for the large sub-directories:
https://github.com/bootandy/dust/commit/3e9ba676bf98cd4d00db25e5e3a59beda512b6f8
@bootandy commented on GitHub (Feb 26, 2022):
I'm not going to do this, it would take up too much horizontal space to align all the numbers up.
@eugenesvk commented on GitHub (Feb 26, 2022):
no it wouldn't, see my comment above on how to get the required differentiation without much horizontal space, and anyway, using spaces as the only differentiator that "wastes" space was your idea, not part of my feaure suggestion