Nushell 0.20

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.

Today, we’re releasing 0.20 of Nu. In this version, we’re introducing some new features for working with rows, improvements to completions, and more.

Where to get it

Nu 0.20 is available as pre-built binaries or from crates.io. If you have Rust installed you can install it using cargo install nu.

If you want all the goodies, you can install cargo install nu --features=extra.

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>.

What’s New

New functionality

each group and each window (ritobanrc)

With 0.20, you can now work with groups of rows at a time easier than ever before.

For example, let’s say you have a table like this:

───┬───────┬─────
 # │ name  │ age
───┼───────┼─────
 0 │ Joe   │  30
 1 │ Fred  │  40
 2 │ Sally │  40
 3 │ Sean  │  42
 4 │ Gram  │  66
 5 │ Todd  │   1
───┴───────┴─────

And you wanted to take three rows at a time, and sum the ages. You can now do this using:

... | each group 3 { get age | math sum }
───┬─────
 0 │ 110
 1 │ 109
───┴─────

Or, you can slide a “window” over the data, looking at multiple rows at a time. Let’s slide a window of two rows, so that we look at each pair. We can use this to average the adjacent rows:

... | each window 2 { get age | math avg }
───┬─────────
 0 │ 35.0000
 1 │ 40.0000
 2 │ 41.0000
 3 │ 54.0000
 4 │ 33.5000
───┴─────────

Completion improvements (thegedge, rezural)

The new completer received a lot of bugfixes, more fixes, and yet more fixes since its initial release with 0.19. We’re continuing to improve this experience further.

Completions can now be case-insensitive. This is especially useful for platforms where filepaths are case-insensitive.

Command Improvements

Other improvements (fdncred, gillespiecd, lidin, andrasio, radekvit, jonathandturner, coolshaurya)

Removed unnused dependencies, cleanups to duration, some ARM incompatibilites were fixed, some Ctrl+C issues were fixed, optimized some config reading, cleanup code in get and nu-value-ext, rustyline was upgraded (fixing a common instability in Windows), help command get some improvements, random integer got some stability fixes.

Breaking changes

in: and not-in: are now in and not-in

In working with operators, we’ve removed the colon from the in and not-in operators.

trim and str trim are now just str trim

We’ve merged the functionality and now just have the one str trim command.

Locale-formatted numbers temporarily not supported

As part of updating dependencies, we’ve had to temporarily disable locale-formatting numbers. We hope to fix this as dependencies update to the latest versions.

Change in config location

We’ve tried to use a supported ‘directories’ crate, which has meant having to change until we found a supported one. This, unfortunately, means that this release moves the config location again.

On macOS, config path now points to: “$HOME/Library/Application Support/org.nushell.nu/config.toml”, in 0.19.0 and earlier it was: “$HOME/Library/Preferences/org.nushell.nu/config.toml”.

Zulip chat

We’re experimenting with using Zulip for our community chat and design discussions. If you want, you can try the server and tell us what you think. If you’d rather we stick with Discord, you can tell us that, too :)

Looking forward

We’ve put a survey to get feedback from you about Nushell. This will help us focus our efforts in the coming releases to refactor, trim, and polish Nu. Working with a large codebase is always a challenge, and recently we’ve been thinking through what features really make up the “core” Nu experience and what parts can be moved outside of Nu itself. This may mean making more things plugins, cutting back on the depedencies we use, and more. Getting your feedback makes sure we have a clear picture for what the “core” of Nu is to most people.

Even if you’re just curious about Nushell but aren’t using it, we’d love to hear from you.