Nushell 0.28

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.28 of Nu. In this release we've added new commands for working with tables, paths, and lots of general feature improvements.

Where to get it

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

If you'd like to try the experimental paging feature in this release, you can install with cargo install nu --features=table-pager.

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 commands

Rotate (andrasio)

With the new rotate command, we have an easier way to turn rows to columns and columns to rows.

> echo [[col1, col2, col3]; [cell1, cell2, cell3] [cell4, cell5, cell6]] | rotate
───┬─────────┬─────────┬─────────
 # │ Column0 │ Column1 │ Column2
───┼─────────┼─────────┼─────────
 0 │ cell4   │ cell1   │ col1
 1 │ cell5   │ cell2   │ col2
 2 │ cell6   │ cell3   │ col3
───┴─────────┴─────────┴─────────

You can also rotate counter-clockwise:

> echo [[col1, col2, col3]; [cell1, cell2, cell3] [cell4, cell5, cell6]] | rotate counter-clockwise
───┬─────────┬─────────┬─────────
 # │ Column0 │ Column1 │ Column2
───┼─────────┼─────────┼─────────
 0 │ col3    │ cell3   │ cell6
 1 │ col2    │ cell2   │ cell5
 2 │ col1    │ cell1   │ cell4
───┴─────────┴─────────┴─────────

Column rolling (andrasio)

You are now able to move columns around in the same way you may do a bitwise-rotate.

> echo '00000100'
| split chars
| each { str to-int }
| rotate counter-clockwise _
| reject _
| rename bit1 bit2 bit3 bit4 bit5 bit6 bit7 bit8
| roll column 3

───┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────
 # │ bit4 │ bit5 │ bit6 │ bit7 │ bit8 │ bit1 │ bit2 │ bit3
───┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────
 0 │    0 │    0 │    1 │    0 │    0 │    0 │    0 │    0
───┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────

Dropping columns (andrasio)

The new drop column subcommand also gives you the ability to remove the last column from a table.

> echo [[lib, extension]; [nu-core, rs] [rake, rb]] | drop column
─────────
   lib
─────────
 nu-core
 rake
─────────

ANSI strip (fdncred)

With the new ansi strip commandopen in new window, you can remove ansi sequences from a string of text.

Path joining (kubouch)

We now have a path join command which allows you to join part of a path to an existing path following the path conventions for your platform.

For example, on Windows:

> echo 'C:\Users\viking' | path join spam.txt

Or Unix-based systems:

> echo '/home/viking' | path join spam.txt

Functionality

(Experimental) Built-in table paging (rezural)

If you build Nushell with the optional --features=table-pager you'll see some new capabilities we're working on that will let you view a table with a built-in pageropen in new window.

In the future, we'll likely move this to its own command so that you can enable paging in much the same way you would use less in other shells.

Let us know how this works for you.

Timing your pipelines (fdncred)

You can now see the time spent in the last set of commands you sent to Nushell by checking the new $nu.env.CMD_DURATION environment variable.

This will let you, for example, add timings to your prompts for all your fancy prompt needs.

Improved matches (ilius, kubouch)

The match command has a few new flagsopen in new window to give you more control over how you'd like to match text.

You're now also able to invert the matchopen in new window.

Fetch now uses the latest surf and rustls (fdncred)

We're experimenting with moving away from openssl for some commands. In this release, we've moved fetch to use the latest surfopen in new window, which gives us the ability to use rustls instead of openssl. Please try this out and let us know how it works for you.

Cleaner help output (kubouch)

We've cleaned up the help, so that there's now a difference between the synopsis for a command and its full help textopen in new window. This makes help commands output a table that's much easier to read.

JSON order is now preserved, again (andrasio)

We previously supported preserving the order of fields of JSON when serialized and deserialized, but as we changed and updated dependencies we lost this ability.

In this release, it's been re-added so that fields will preserve orderopen in new window once again.

Exit codes (tiffany352)

The exit command can now optionally take an exit codeopen in new window, allowing you to quit a nushell with an exit code that can be detect outside of the shell.

VSCode extension is now published (fdncred)

VSCode users can now use the VSCode extension for Nushell right from the VSCode marketplaceopen in new window!

Internal

Documentation

Looking ahead

We're continuing our 1.0 planning and hope to publish a proposal soon for your feedback. There are also some on-going experiments, including a new line editoropen in new window that are offering good insights into better ways of working with the terminal.

And, of course, we hear the feedback about improving completions. We're very much interested in beginning experiments here that will lead to a far better experience as we approach 1.0.