I loathe MSFT’s shells, but I recently ran across nushell. Wow! Finally a shell on Windows I can use. Commands like ls -a work. HUGE improvement. Coupling it with ripgrep helps me find things inside Mathematica notebooks when I think “Where did I put my notes on xyz?”. A typical session starts with opening a terminal window in some folder and then nu followed by rg xyz *.nb | more. Nushell alone was a game changer, with rg the improvement is exponential.
Unlike WSL (and similar), both nushell and rg run within Windows (natively): all windows paths and commands are available without mismatched filesystem interfaces to mess things up.
I still need to use Win 11, and this combo makes using its CLI tolerable. It might help you too if you want a low effort way to do Linux like things on Windows. Both commands provide various ways to install an exe. I compiled (Rust) nushell, and I probably used winget for ripgrep (a year or two ago). The only “hard” part was adding these commands to my executable path.
Finally, both are available on Win Mac and Linux, so they’re learn once and use everywhere.
@Mat I haven’t given this enough reading, research and exercise. I have tried ripgrep, but I haven’t had enough use cases to do much with it. I’m looking forward to digging into Nushell. I understand it’s “possible” to use it in places other than Windows, but from my initial impression it appears that Windows is the sweet spot for it. PowerShell is the only other utility that comes even remotely close to what Nushell can do.
I don’t even have a Windows based system, but I’m interested in digging into this when I get the time to give it justice. In the meantime I appreciate your article and I look forward to returning to it several times until I either gain a good appreciation of the capabilities of NuShell or I actually get an opportunity to try it out. In any case, thanks for your informative article!
Haha. If you’ve got plenty of good shell choices (e.g. running Linux), nu isn’t quite isn’t so remarkable relatively speaking. I haven’t yet dug into its structured data idea at all, but I can imagine how useful it might be. Did you have trouble getting it to install? I thought that because it’s written in Rust it’d compile and run easy-peasy.
@Mat I didn’t figure out what I was missing so far; I want to wait until I have a lot of time so I can dig, debug, rebuild, fail, and try, try again until I get it right. Kinda looks like on one hand Nushell isn’t the only game in town, but it also looks roughly analogous to how nala puts a different appearance to the package manager experience - nu seems to do similar things with the shell. Is that impression accurate at all?
@Brian_Masinick Sorry, but I’m not familiar with nala, nor am I a nu wiz. I’ve just been blown away by being able to natively get linux like behavior from commands like ls. TLDR; I got carried away. In case it helps, here’s what I did.
I have Rust (i.e. rustc, the rust compiler) installed (or this), and I built nushell after cloning their GitHub repository to my system. I suggest using rustup to install rustc, as it’s what the devs expect, and rustup manages the Rust build system (updates, nightly, libs, cargo, …) going forward. The build command is cargo build executed in the cloned repository’s top level directory, and I recall it running without problems. Building nushell from its source takes advantage of cargo’s dependency management: it will download the correct versions to match the build requirements. And, if there’s a problem with dependencies, you’ll see error messages, which I’ve mostly found informative. After building you need to move the exe (nu.exe in D:\proj\dev\rust\,git_clone\nushell\target\release on my system) to a folder on your executable path.
Edit: linux rustc install commands
In my home directory (select 1 default when propmted) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
I needed to run these too (ideally before the curl command) sudo apt update followed by sudo apt install build-essential
@Mat Given the use of Rust components, I’ll pass on trying out NuShell. When I was trying out the 50 Linux Text Editors as reported by @hydn I had Rust installed. While it works, even running a rust-based text editor drives up the heat on my systems. The Lenovo T14 I run is prone to run on the hot side to begin with; I don’t want to keep challenging it with more Rust-based apps. Though this laptop isn’t too old, it’s not the latest generation but it’s all I can afford. I do like to try stuff out sometimes, but I’m gonna pass on this. I do, however, appreciate your review and your comments on the subject nevertheless. Nice explanation!