Home Explore Blog CI



nushell

blog/2021-03-09-nushell_0_28.md
6f8f7d4092923dd60cf16089fd0e1b6c8666573ff09174680000000300002623
---
title: Nushell 0.28
author: The Nu Authors
author_site: https://twitter.com/nu_shell
author_image: https://www.nushell.sh/blog/images/nu_logo.png
excerpt: 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.
---

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

<!-- more -->

# Where to get it

Nu 0.28 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.28.0) or from [crates.io](https://crates.io/crates/nu). 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` command](https://github.com/nushell/nushell/pull/3095), 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 pager](https://github.com/nushell/nushell/pull/3128).

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 flags](https://github.com/nushell/nushell/pull/3111) to give you more control over how you'd like to match text.

You're now also able to [invert the match](https://github.com/nushell/nushell/pull/3114).

### 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 surf](https://github.com/nushell/nushell/pull/3120), 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 text](https://github.com/nushell/nushell/pull/3124). 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 order](https://github.com/nushell/nushell/pull/3126) once again.

### Exit codes (tiffany352)

The `exit` command can now [optionally take an exit code](https://github.com/nushell/nushell/pull/3132), 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 marketplace](https://marketplace.visualstudio.com/items?itemName=TheNuProjectContributors.vscode-nushell-lang)!

## Internal

- Improved [tests for nu-env](https://github.com/nushell/nushell/pull/3078) (andrasio)
- We now remove the [current directory (`.`) from paths](https://github.com/nushell/nushell/pull/3084) where possible (iCodeSometime)
- We've begun a multi-step process of simplifying how tables are rendered. The first step is to [convert drawing table to return strings](https://github.com/nushell/nushell/pull/3088) (rezural).
- We've [vendored an ansi term crate](https://github.com/nushell/nushell/pull/3089) to make it easier to improve. This helped make ['Light' colors](https://github.com/nushell/nushell/pull/3100) easier to reach. (fdncred)
- We've removed some [unnecessary dependencies](https://github.com/nushell/nushell/pull/3091) (stormasm)
- Some general [improvements to parser logic](https://github.com/nushell/nushell/pull/3093) (ilius)
- Some crashes in [`flatten` and docs were fixed](https://github.com/nushell/nushell/pull/3099) (stormasm)
- We're now using the [host for output](https://github.com/nushell/nushell/pull/3112) rather than `std::err` for better portability. (LhKipp)
- Improved ergnomics [when working with $nothing](https://github.com/nushell/nushell/pull/3133) (fdncred)
- Fixed some [locking logic when working with output](https://github.com/nushell/nushell/pull/3140) (ahkrr)
- Bel and backspace are [now part of `char`](https://github.com/nushell/nushell/pull/3144) (fdncred)
- [Trash functionality has been fixed](https://github.com/nushell/nushell/pull/3146) (tw4452852)
- Today's crates.io release was also [fully automated, thanks to Nushell](https://github.com/nushell/nu_scripts/blob/main/nu_release.nu) (sophiajt)

## Documentation

- Instructions for building and [running the website locally](https://github.com/nushell/nushell.github.io/pull/109) (jakevossen5)
- Updates to the [docker instructions](https://github.com/nushell/nushell.github.io/pull/108) (jakevossen5)
- Improvements to the [environment documentation](https://github.com/nushell/nushell.github.io/pull/107) (stormasm)
- Fixed typo in the [textview docs](https://github.com/nushell/nushell.github.io/pull/106) (davidmalcolm)
- Corrected [Nushell version in excerpt](https://github.com/nushell/nushell.github.io/pull/104) (iCodeSometime)
- Fixed a typo in the [PowerShell comparison](https://github.com/nushell/nushell.github.io/pull/103) (JTurtl3)

# 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 editor](https://github.com/sophiajt/reedline) 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.

Chunks
a4a05acf (1st chunk of `blog/2021-03-09-nushell_0_28.md`)
47c31605 (2nd chunk of `blog/2021-03-09-nushell_0_28.md`)
8cffd49e (3rd chunk of `blog/2021-03-09-nushell_0_28.md`)