Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your commandline. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful commandline pipelines.
Greetings and welcome to the 10th release of Nushell! Yes, that’s right this is the tenth release of Nu we’ve put out in the wild, and oh is this release wild. So let’s stop dilly-dallying and get right to it, shall we?
If you want more goodies, you can install
cargo install nu --features=stable.
As part of this release, we also publish a set of plugins you can install and use with Nu. To install, use
cargo install nu_plugin_<plugin name>.
Yes, you read that right, we’re just beginning to add support for running Nu scripts. So far, these scripts are simple things. Nu will go line by line and run each line. But we’re looking forward to building up support with more features as we go.
To run a script, you just call
nu and pass in it the script file:
> cat hello_world.nu echo hello echo world > nu hello_world.nu hello world
Another fun features in this release is the ability to run a Nu command from outside of Nu. Just like shells like Bash and Windows CMD, you can now pass the
-c flag and give the pipeline you want to run:
> ./nu -c "ls | get name" ─────┬─────────────────────────────── # │ <value> ─────┼─────────────────────────────── 0 │ .cargo-lock 1 │ .fingerprint 2 │ build 3 │ deps
Tired of typing those long flags that every Nu command seems to have? Worry no more! You can now use short flags in many common Nu commands. For example:
> ls --full
You can now use:
> ls -f
The shorthand flags are listed as part of the updated help section
If you’re coming to Nu from other CLIs, you might have wondered why you always had to put flags at the end. A little annoying, right? We fixed it.
> ls *.sh --full
> ls --full *.sh
Use whichever you like best.
We’ve extended the set of plugins installed with
cargo install nu --features=stable to the whole set of stable plugins. This cuts down on the amount of extra plugins to install if you want the full set. It should also help cut down on the confusion when users expected a command to be available but wasn’t installed by default. You can still install without these additional commands, if you like, and pick and choose the ones you want.
There’s a new
calc command in development that can calculate the result of math expressions in a string.
> echo "2+3" | calc 5.000000000000000
Nu now also has a cross-platform
kill command, for killing processes.
External commands commands can now access the
$nu variable that holds internal values for Nu.
You can now parse datetime strings using the
ducommand now shows apparent and physical disk usage (Amanita-muscaria)
du command now lets you see both the amount of space that directories appear to take as well as the amount of total actual space they take up on the disk.
By default, the
help command now prints a little more information by default to help you get started.
Better errors for incorrect
mv and incorrect flags, better performance running external commands, better code documentation, plugins can now have numbers in their names, test directories can now have spaces in their names, fixed some issues with
cp, moved off of the “futures-preview” crate to “futures” official, fixes to working with external commands that don’t send line endings, improvements to
textview and more.
Adding the ability to run scripts gives Nu a lot more potential when used in larger tasks, and we’re excited to continue to grow this support. This work comes out of the work to add aliases, which we’re currently working on. It also opens up the possibility of running Nu from other hosts in the future.
Scripting also lends itself to needing more structure, variables, and more. We’re looking ahead to those, too.