Home Explore Blog CI



nushell

1st chunk of `blog/2020-06-30-nushell_0_16_0.md`
f7908aec840b275edf022287ea488cf47a11315ac50141930000000100000fc5
---
title: Nushell 0.16.0
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.16 of Nu. What's new?
---

# Nushell 0.16.0

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.16 of Nu

# Where to get it

Nu 0.16.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.16.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 more goodies, you can install `cargo install nu --features=stable`.

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 automated release binaries (charlespierce, fdncred, sophiajt)

Up to this point, we've hand-rolled all the binary releases. The process has been time-consuming and error-prone. Starting with 0.16.0, we'll be releasing using the GitHub release automation. The first benefits you'll see is that we've also added a wix-based installer for Windows users. The second, perhaps harder to see, benefit is a more relaxed release process that's easier on the project maintainers :)

Please note: as part of this, we took the opportunity to also align the directory structure across platforms. Apologies in advance for any inconvenience this might cause.

## New textview (fdncred)

We've had a few requests for an improved text viewing experience, so with 0.16.0 we're trying out a new viewer based on the [bat](https://crates.io/crates/bat) crate. We also support quite a lot of [configuration settings](https://github.com/nushell/nushell/pull/2010) for this new text viewer.

## New commands

### Let's get `random` (JosephTLyons)

We have a new top-level command: `random`. To start, there are three sub-commands:

- `random uuid` - generate random UUIDs
- `random bool` - a random "coin flip" with optional bias
- `random dice` - roll a single or a set of dice, optionally setting the number of sides and number of dices

### More `math` (JosephTLyons, arashout, andrasio, amousa11)

We've consolidated and added to our math operations. Now available as part of the 0.16.0 release:

- `math avg` - averages a list of numbers
- `math sum` - totals a list of numbers
- `math mode` - gets the mode of a list of numbers
- `math median` - gets the median of a list of numbers
- `math min` - gets the minimum value of a list of numbers
- `math max` - gets the maximum value of a list of numbers

### Other commands

- [`every`](https://github.com/nushell/nushell/pull/1992) - lets you skip every n-rows (kubouch)
- `ansi` - lets you output ANSI color codes to color your strings (sophiajt, fdncred)
- `char` - makes it possible to output newlines and tabs (sophiajt)
- `do` - runs a block to completion, optionally ignoring errors (sophiajt)

## Custom prompts (sophiajt)

You can now run a pipeline which returns a string, or list of strings, that is used to create a custom prompt. To do so, set the pipeline you want to use in the config for the `prompt` setting.

A simple example:

```
> config --set [prompt "echo '> '"]
```

We've also added a new `ansi` command to let you change the color. Let's use it to change the prompt to blue:

```
> config --set [prompt "echo $(ansi blue) '> '"]
```

You can make the prompt even fancier. For example, this prompt prints the current directory, git branch, and current date and time:

```
> config --set [prompt 'echo [ $(ansi green) $(pwd) $(ansi reset) $(do -i {git rev-parse --abbrev-ref HEAD } | trim | echo [ "(" $(ansi blue) $it $(ansi reset) ")" ] | str join) $(char newline) $(ansi cyan) $(date --format "%d/%m/%Y %H:%M:%S").formatted $(ansi reset) "> " ]']

Title: Nushell 0.16.0 Release: New Features and Improvements
Summary
Nushell 0.16.0 is released with automated release binaries, a new text viewer, and several new commands including `random`, `math` operations, `every`, `ansi`, `char`, and `do`. It also introduces customizable prompts using pipelines and ANSI color codes.