[GH-ISSUE #183] Hide decimals when there are only zeroes instead of approximately zero #80

Closed
opened 2026-06-08 11:25:35 +03:00 by zhus · 1 comment
Owner

Originally created by @eugenesvk on GitHub (Sep 21, 2021).
Original GitHub issue: https://github.com/bootandy/dust/issues/183

For example, I have two files with the sizes of 1 byte and 1024 bytes, dust would provide the following output:

  1B   ┌── 1b      
1.0K   ├── 1024b   

However, since 1024 is precisely 1KB, abbreviating it to 1.0K is misleading as I might think that in reality it's 1.04K shortened to the first decimal, so I'd prefer to see the following output, which is also cleaner

  1B   ┌── 1b      
1  K   ├── 1024b   
Originally created by @eugenesvk on GitHub (Sep 21, 2021). Original GitHub issue: https://github.com/bootandy/dust/issues/183 For example, I have two files with the sizes of 1 byte and 1024 bytes, dust would provide the following output: ``` 1B ┌── 1b 1.0K ├── 1024b ``` However, since `1024` is precisely `1KB`, abbreviating it to `1.0K` is misleading as I might think that in reality it's `1.04K` shortened to the first decimal, so I'd prefer to see the following output, which is also cleaner ``` 1B ┌── 1b 1 K ├── 1024b ```
zhus closed this issue 2026-06-08 11:25:36 +03:00
Author
Owner

@bootandy commented on GitHub (Sep 24, 2021):

I'm afraid I really don't like that syntax, so that's a no from me.

<!-- gh-comment-id:926166618 --> @bootandy commented on GitHub (Sep 24, 2021): I'm afraid I really don't like that syntax, so that's a no from me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#80