Home Explore Blog CI



nushell

blog/2020-09-22-nushell_0_20.md
edb138cb5813e4874985c06cbedcc76503e0e684b6fee5800000000300001ecf
---
title: Nushell 0.20
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.20 of Nu. In this version, we're introducing some new features for working with rows, improvements to completions, and more.
---

# 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](https://github.com/nushell/nushell/releases/tag/0.20.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`.

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](https://github.com/nushell/nushell/pull/2497), [more fixes](https://github.com/nushell/nushell/pull/2503), and [yet more fixes](https://github.com/nushell/nushell/pull/2525) since its initial release with 0.19. We're continuing to improve this experience further.

Completions can [now be case-insensitive](https://github.com/nushell/nushell/pull/2556). This is especially useful for platforms where filepaths are case-insensitive.

## Command Improvements

- **NEW** [`random integer`](https://github.com/nushell/nushell/pull/2489) - create random integers (smaydew)
- **NEW** [`exec`](https://github.com/nushell/nushell/pull/2495) - on Unix-based systems with exec support, you can now call the built-in `exec` command (almindor)
- **NEW** [`mod`](https://github.com/nushell/nushell/pull/2505) - a new modulo operator (sophiajt)

- `mv` now uses the [`fs_extra` crate for better recursive moves](https://github.com/nushell/nushell/pull/2487) (almindor)
- More table themes (fdncred)
- `ls -l` now also lists the [number of links](https://github.com/nushell/nushell/pull/2496) (gillespiecd)
- `str substring` can now [optionally take a range](https://github.com/nushell/nushell/pull/2499) (defstryker)
- `char` gets support for [weather characters](https://github.com/nushell/nushell/pull/2500) (fdncred)
- Ranges can now [start or end with variables](https://github.com/nushell/nushell/pull/2506) and can have [decimal numbers as boundaries](https://github.com/nushell/nushell/pull/2509) (sophiajt)
- Ranges can now [also be exclusive](https://github.com/nushell/nushell/pull/2541) using the `x..<y` syntax (radekvit)
- `ps -l` now [shows cpu time](https://github.com/nushell/nushell/pull/2507) (gillespiecd)
- `with-env` can now [accept multiple variables](https://github.com/nushell/nushell/pull/2526) (itn3000)
- `math avg` will now [also work with durations](https://github.com/nushell/nushell/pull/2529) (gorogoroumaru)
- `reduce` can now [work with table values](https://github.com/nushell/nushell/pull/2529) (andrasio)
- The active shell in `shells` is [now more clearly shown](https://github.com/nushell/nushell/pull/2540) (gillespiecd)
- `sleep` now [respects Ctrl+C](https://github.com/nushell/nushell/pull/2550) and can [pass along the output](https://github.com/nushell/nushell/pull/2558) (radekvit)
- `str trim` and `trim` are [merged](https://github.com/nushell/nushell/pull/2576) (gillespiecd and radekvit)
- `str find-replace` can now [global search/replace](https://github.com/nushell/nushell/pull/2569) (fdncred)
- `open` now only streams for [non-files and large files](https://github.com/nushell/nushell/pull/2570) (sophiajt)
- If supported on the platform, `benchmark` now gives [user/system/idle times as well](https://github.com/nushell/nushell/pull/2571) (radekvit)
- Ctrl+D now [exits the current shell](https://github.com/nushell/nushell/pull/2583) (gillespiecd)
- `fetch` now [supports CSV MIME types](https://github.com/nushell/nushell/pull/2587) (notryanb)

## Other improvements (fdncred, gillespiecd, lidin, andrasio, radekvit, sophiajt, coolshaurya)

Removed unused dependencies, cleanups to duration, some ARM incompatibilities 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](https://nushell.zulipchat.com/). If you'd rather we stick with [Discord](https://discord.gg/NtAbbGn), you can tell us that, too :)

# Looking forward

We've put a [survey to get feedback from you about Nushell](https://docs.google.com/forms/d/e/1FAIpQLScEFzDh7j3jfAuVMBCQtQE-qfKAhugLCiUaaGL583QtGwz5fw/viewform?usp=sf_link). 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 dependencies 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.

Chunks
01b6e9e8 (1st chunk of `blog/2020-09-22-nushell_0_20.md`)
8d8afb1f (2nd chunk of `blog/2020-09-22-nushell_0_20.md`)
09681987 (3rd chunk of `blog/2020-09-22-nushell_0_20.md`)