Skip to content

Latest commit

 

History

History
85 lines (59 loc) · 5.76 KB

2021-01-26-nushell_0_26.md

File metadata and controls

85 lines (59 loc) · 5.76 KB
title author author_site author_image excerpt
Nushell 0.26
The Nu Authors
Today, we're releasing 0.26 of Nu. It's a polish release with lots of improvements.

Nushell 0.26

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.26 of Nu. It's a polish release with lots of improvements.

Where to get it

Nu 0.26 is available as pre-built binaries or from crates.io. 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

Rest support in custom commands (LhKipp, jonathandturner)

You can now refer to a rest argument in your custom command:

def my-cmd[...rest:int] {
    echo $rest | math sum
}

Elements of the rest are referred to with positions, like $rest.1 for the 2nd position.

Short flags in custom commands (LhKipp)

You can now also added an optional shorthand flag to longhand flags:

def foo [--bar(-b): int] {
    echo $bar
}

foo -b 10
foo --bar 10

Improved build times (jonathandturner, stormasm)

When building from scratch, you may now notice that Nushell builds slightly faster. This comes from refactoring large crates into smaller crates and replacing some of our support crates with similar crates that compile faster.

Improvements

I hope you like improvements. We got a lot of them this release.

Breaking changes

  • ps and sys are now served using a different supporting crate. The functionality difference between the old crate and the new crate may mean a lack of fields that existed before, or different values than before (as it may be calculated differently).
  • We removed str set. This command was one of the first of its style and has since been replaced by more general commands like update.
  • Internal architecture: the Primitive case for lines has been removed. Instead, use strings.
  • Internal architecture: the Path and Pattern primitives are now called FilePath and GlobPattern respectively.

Looking forward

We've been humbled by the feedback we got on the 0.25 release and appreciate the support. Looking forward, we'll be continuing to polish the features that landed in 0.25 as we prepare for using these features in larger scripts and in custom completion logic.