Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix output formatting for free #34

Merged
merged 4 commits into from
Mar 16, 2024
Merged

Conversation

claudex
Copy link
Contributor

@claudex claudex commented Mar 8, 2024

The GNU free is using 11 chars wide for number, not 12. This was also causing a misalignment of the numbers with the title.

The source for the 11 chars wide: https://gitlab.com/procps-ng/procps/-/blob/master/src/free.c?ref_type=heads#L336

The GNU free is using 11 chars wide for number, not 12. This was also
causing a misalignement of the numbers with the title.
@sylvestre
Copy link
Contributor

please don't look at the source of the GNU implementation. it is GPL code and incompatible with this license.

@sylvestre
Copy link
Contributor

also, could you please add a test https://github.com/uutils/procps/blob/main/tests/by-util/test_free.rs to make sure we don't regress?
thanks

@claudex
Copy link
Contributor Author

claudex commented Mar 8, 2024

I've added the tests, tell me if you think I should test more.

@claudex
Copy link
Contributor Author

claudex commented Mar 8, 2024

Sorry, I forgot to run cargo fmt

@sylvestre sylvestre merged commit 6afec4d into uutils:main Mar 16, 2024
4 of 13 checks passed
@sylvestre
Copy link
Contributor

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants