du: block size parsing
Open
Nobody has claimed this yet.
U - du
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
-
-B0shouldn't panic. I think this should win some kind of "panic golf" :) -
1000andkband1024andkshould result in different output, butparse_size_u64causes information loss (i.e. does not return whether a multiplier was used). -
0b11should be accepted (and interpreted as 3), butdetermine_number_systemdoes not recognize that prefix.
I think I'll fix this myself soon-ish, but wanted to documented it first, in case I forget about it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with du's block-size parsing and inspect parse_size_u64 and determine_number_system. Check the listed -B0, multiplier, and 0b11 cases, then confirm that zero no longer panics, multiplier distinctions are preserved, and binary-prefixed values are accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100