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

numfmt: implement missing options #1280

Open
6 of 9 tasks
arsdragonfly opened this issue Aug 26, 2018 · 10 comments
Open
6 of 9 tasks

numfmt: implement missing options #1280

arsdragonfly opened this issue Aug 26, 2018 · 10 comments

Comments

@arsdragonfly
Copy link
Contributor

arsdragonfly commented Aug 26, 2018

Currently these options available in GNU numfmt are still missing:

  • --debug
  • -d/--delimiter
  • --field
  • --from-unit
  • --grouping
  • --invalid
  • --round
  • --suffix
  • -z/--zero-terminated

I'll be implementing them as much as I can.

@JJJollyjim
Copy link
Contributor

Is it okay for me to have a go at few of these? (currently thinking of --field/-d)

Fine if you want to do it of course :)

@arsdragonfly
Copy link
Contributor Author

arsdragonfly commented Sep 24, 2018 via email

@stale
Copy link

stale bot commented Mar 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 27, 2021
@jfinkels
Copy link
Collaborator

Looks like -d, --field, and --round have been implemented:

$ ./target/debug/coreutils numfmt --help
[...]
OPTIONS:
    -d, --delimiter <X>     use X instead of whitespace for field delimiter
        --field <FIELDS>    replace the numbers in these input fields (default=1) see FIELDS below [default: 1]
        --from <UNIT>       auto-scale input numbers to UNITs; see UNIT below [default: none]
        --header <N>        print (without converting) the first N header lines; N defaults to 1 if not specified
        --padding <N>       pad the output to N characters; positive N will right-align; negative N will left-align; padding is ignored if the output is wider than N; the default is to automatically pad
                            if a whitespace is found
        --round <METHOD>    use METHOD for rounding when scaling; METHOD can be: up,down, from-zero (default), towards-zero, nearest [default: from-zero]  [possible values: up, down, from-zero, towards-
                            zero, nearest]
        --to <UNIT>         auto-scale output numbers to UNITs; see UNIT below [default: none]

@stale stale bot removed the wontfix label Aug 29, 2021
sbentmar added a commit to sbentmar/coreutils that referenced this issue Jan 1, 2022
adds support for the --suffix option from issue uutils#1280.
sbentmar added a commit to sbentmar/coreutils that referenced this issue Jan 1, 2022
adds support for the --suffix option from issue uutils#1280.
@sbentmar
Copy link
Contributor

sbentmar commented Jan 3, 2022

I've implemented suffix now, which solved 18 of the GNU numfmt tests. Might have a look at --invalid next :)

@rivy
Copy link
Member

rivy commented Jan 3, 2022

@sbentmar , thanks for the contribution!

I can't find the test changes; the total GNU test summary reports "GNU tests summary = TOTAL: 601 / PASS: 199 / FAIL: 295 / ERROR: 23", unchanged from 'master'. Am I missing the test change somewhere else?

@sylvestre
Copy link
Sponsor Contributor

@rivy probably because the .sh test from gnu isn't fulling passing.

@sbentmar
Copy link
Contributor

sbentmar commented Jan 3, 2022

Sorry for the confusion, 18 more of the ~400 numfmt Perl test cases are passing now. I suspect that the entire numfmt.pl test suite counts as a single test in the complete summary, so all the 400 tests need to pass for it to count. There are still 171 failing test cases, in that case :)

@rivy
Copy link
Member

rivy commented Jan 4, 2022

Sorry for the confusion, 18 more of the ~400 numfmt Perl test cases are passing now. I suspect that the entire numfmt.pl test suite counts as a single test in the complete summary, so all the 400 tests need to pass for it to count. There are still 171 failing test cases, in that case :)

Ah, thanks for the clarification.

@stale
Copy link

stale bot commented Jan 20, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

7 participants