uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.26k stars 1.24k forks source link

`printf`: Fix extra padding space and wrong position of `-` when padding #6520

Closed Kev1n8 closed 2 days ago

Kev1n8 commented 1 week ago

should fix #6519 and #2774. added some padding tests and fix the incorrect behaviors of padding

Kev1n8 commented 3 days ago

Just added a case check, should fix the remaining issue in #2774. Before this, there was a incorrect output as following:

Screenshot 2024-07-06 at 15 22 30
sylvestre commented 3 days ago

Just added a case check, should fix the remaining issue in #2774. Before this, there was a incorrect output as following: Screenshot 2024-07-06 at 15 22 30

could you please replace the screenshot by text? it is terrible for accessibility and search. thanks

Kev1n8 commented 3 days ago

could you please replace the screenshot by text? it is terrible for accessibility and search. thanks

Sorry for my carelessness. The incorrect output text is as following: /coreutils printf "%+5.1f" 2 + 2.0%

Kev1n8 commented 2 days ago

sorry, that was an accident.