Initial implementation for uutils uname#11684
Conversation
|
Thanks @dmatos2012 for another great PR! I'm wondering if uuname can just return the data instead of printing it out? It would be great to have something closer to $nu.os-info. ❯ $nu.os-info
╭────────────────┬─────────╮
│ name │ windows │
│ arch │ x86_64 │
│ family │ windows │
│ kernel_version │ 22631 │
╰────────────────┴─────────╯Maybe something like this ╭───────────────────┬─────────────────────────╮
│ kernel-name │ Windows_NT │
│ node-name │ DESKTOP-1QK8J8G │
│ kernel-release │ 10.0 │
│ kernel-version │ 22631 │
│ machine │ x86_64 │
│ processor │ unknown │
│ hardware-platform │ unknown │
│ operating-system │ MS/Windows (Windows 11) │
╰───────────────────┴─────────────────────────╯ |
Thought about something similar as well to the output of However, with your suggestion, it means there would be only one way of using it: namely |
|
ya, i think it would be more nushell-y just to print out a record if we can get the information. |
|
Not quite right but looking better. |
|
Please check this and the As far as testing goes, given that we have no flags now, I think we will have to rely on their test harness at least for now. |
|
Looks good on my windows box. I'll try to test it on mac later. |
|
This is what my mac says. Long kernel-version, not saying that's bad, was just surprised. |
|
I guess we're just waiting for the core-utils release. Is that correct? |
Yes, technically we are waiting for it to be merged first, and then the release, but aside from that everything should be ready. |
|
yay! one step closer. |
|
yeah I think I somehow messed up the branch but should be fixed now @fdncred. So maybe time to take it for a ride and wait for the release of |
|
It's kind of amazing how troublesome a little utility like this can be. I really appreciate all the effort doing the uutils PR and making changes here, so it works nushell-y. All good stuff. Thanks very much! |
|
I guess we're still waiting for a coreutils release? @tertsdiepraam is there a coreutils release in our future? 🤣 |
|
🔮👀 My cristal ball says.... yes, should be fairly soon |
|
Will this replace |
no. $nu.os-info is a compile time variable that we plan on keeping. it's helpful because it's super fast. |
|
yay, looks like coreutils 0.25 has been released |
|
I think this should be ready to go now @fdncred ? The diff probably looks weird as I noticed all of the |
|
I'd like to keep all uu_* crates on the same version so I changed them all to 0.0.25. I think bad things may happen if we mix and match versions. |
|
The |
|
Thanks again @dmatos2012!! |


Hi,
This PR aims at implementing the first iteration for
unameusinguutils. Couple of things:uutilsrepo.Description
User-Facing Changes
Tests + Formatting
Don't forget to add tests that cover your changes.
Make sure you've run and fixed any issues with these commands:
cargo fmt --all -- --checkto check standard code formatting (cargo fmt --allapplies these changes)cargo clippy --workspace -- -D warnings -D clippy::unwrap_usedto check that you're using the standard code stylecargo test --workspaceto check that all tests pass (on Windows make sure to enable developer mode)cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"to run the tests for the standard library-->
After Submitting