Nushell 0.19

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.19 of Nu. In this version, we fill some long-lived gaps in Nu, improve completions, theming, and much more.

Where to get it

Nu 0.19 is available as pre-built binariesopen in new window or from crates.ioopen in new window. 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 completion engine (thegedge)

animation of Nu completion

Nushell's completion suggestions are now built around the nushell parser. This means completers can now use a much richer context to provide relevant suggestions. This is still a work in progress, but one immediate improvement is that we can now complete commands, flags, and arguments in most nested structures. For example, echo $(l<TAB> will show you all commands that start with l.

The completion work is still very "new", with parts landing in the hours before the release, so please give it a spin and let us know where we can keep improving it.

Improved theming (fdncred)

image of a Nu table built with hearts

Nu, with love

We're continuing to expand what's possible with Nu's themes, allowing you to configure more areas of how your data is displayed.

image of a Nu table custom colors

You can also configure how the various Nu data types are displayed. You can learn about the new custom data colorsopen in new window if you're interested in configuring them for yourself. There's also and example config.toml hereopen in new window with an example of how to set the colors you like.

Table literals (sophiajt)

Starting with 0.19, you can now write table values like you would other kinds of values. To do so, separate a row of header names from the data using a ;. For example:

> echo [[name size]; [ST 185] [KJ 160]]
 # │ name │ size
 0 │ ST   │  185
 1 │ KJ   │  160

To be a valid table, the number of columns needs to line up.

Multiline edits (sophiajt)

In addition to the new table literals, we're opening up multiline commands. Initially, this will be for the line editor, but we'll extend this further as we improve parser support.

You can now also write the above:

> echo [
[name, size];
[ST, 185]
[KJ, 160]
 # │ name │ size
 0 │ ST   │  185
 1 │ KJ   │  160

You might have noticed we now also allow commas to separate cells. These are intended to help readability and give a more familiar syntax for people coming from other languages.

Nushell celebrates its first year in the public

We recently sat down and wrote about where Nushell has come over the last yearopen in new window and some thoughts about where it's going. The blog post is a wealth of information about Nu's philosophy and direction. Well worth a read.

Command improvements

More cleanup and improvements (gillespiecd, sophiajt, Marcoleni, andrasio, dmeijboom, thegedge, jzaefferer, ryuichi1208, JosephTLyons)

Cleanups in math commands, extra bits of command help, reformatting of the command list, better email samples, cleaned up spans in pipelines, fix to header command with mismatched columns, cleanup of dependency usage, cleaned up display config, added crossreferences in command help, subcommands are now sorted before being listed, some dockerfile improvements, nu-cli now has nu-data split off from it, column count now won't break on empty tables, wasm is now tested on CI, improvements to histogram and count,

Breaking changes

Starship is now external

To help Nu focus a bit more on the core capabilities, and to free up it to update separate from Nu, Starship is now external. Once you install Starship, you can set your prompt to use starship using:

> config set prompt `echo $(starship prompt)`

You can also set Nu to use other prompts as well. For example, if you like powerline, you can also use this:

> config set prompt `echo $(powerline shell left)`

No more auto-pivot by default

Based on feedback from users, we've now disabled any auto-pivoting of tables by default. You can still re-enable this behavior in your config, but we will no longer rotate any tables without being explicitly asked.

# To only rotate large tables:
> config set pivot_mode auto

# To always rotate a single row to be vertical:
> config set pivot_mode always

Time units are now renamed

To make it easier, and more readable, to work with a variety of units in the future, we've renamed the time units.

Instead of 1s, you'll now use 1sec. Most units for time now follow 3 letters instead of a single letter. You can read more about the full change in the PRopen in new window.

Header colors

With the new theming support, header_color, header_bold, and header_align have moved into the [color_config] section, and out of the root level, of the config.toml file.

Simplified default build

While not technically a breaking change, it's worth a mention that starting with 0.19, you don't need to use --features=stable to get most of Nu's features. We've folded most of the common ones into the default install. For all the bells and whistles, now use --features=extra, which includes additional functionality not part of the original stable release.

Looking forward

With 0.19, we see the first deeper changes to the completion engine since Nu was first released. These will grow to allow custom completions for commands, and we're looking forward to making these features available.

The new table literal also takes a step in the direction of data frame support in the future, a powerful feature popularized by pandas, R and other data processing libraries and languages. With it, we hope Nu will continue to grow to having a richer, more nuanced, view of data over time.