Skip to content

Latest commit

 

History

History
139 lines (106 loc) · 17.4 KB

2023-05-16-nushell_0_80.md

File metadata and controls

139 lines (106 loc) · 17.4 KB
title author author_site author_image excerpt
Nushell 0.80
The Nu Authors
Today, we're releasing version 0.80 of Nu. This release adds record type annotations, modules from directories, and improvements to the standard library.

Nushell 0.80

Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. 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 command line pipelines.

Today, we're releasing version 0.80 of Nu. This release adds record type annotations, modules from directories, and improvements to the standard library.

Where to get it

Nu 0.80 is available as pre-built binaries or from crates.io. If you have Rust installed you can install it using cargo install nu.

NOTE: The optional dataframe functionality is available by cargo install nu --features=dataframe.

As part of this release, we also publish a set of optional plugins you can install and use with Nu. To install, use cargo install nu_plugin_<plugin name>.

Themes of this release / New features

Record type annotations (@1Kinoti)

Starting with this release, you can add more information about the type of a record your command expects. For example:

def okay [person: record<name: string age: int>] {}

The above will require two fields to be present, a name that's a string, and an age that's an int. The current version requires that the record has exactly these fields, though we may loosen this in future releases to allow for structural subtyping.

Modules from directories (@Kubouch)

It is now possible to create a module from a directory. The directory must contain mod.nu and all other .nu files are added as a submodule of the module. This allows some traditional shell patterns such as dumping completion files into a directory to be loaded automatically. Check out the newly updated book chapter for more details and examples.

The enabling feature for module directories was organizing modules into submodule structure instead of solely relying on re-importing symbols with export use. module and especially export module have been added as a result of this change. While not immediately visible, the module update allows for cleaner submodule oganization without relying on re-exporting symbols with export use. Since modules are now aware of their submodules, in the future we hope to improve discoverability of definitions within modules, enhancing our IDE support (such as our LSP).

Stdlib update ([@amtoine, @EmilySeville7cfg, @skelly37, @YummyOreo][std-lib PRs])

hash commit PR
3268ecd11 FEATURE: add the bench command to the standard library #8969
155de9f6f Added log custom command & exported log levels #9055
edb61fc1d Try to show help pages for external commands w/ help command #9025
7a945848d swap the date and the log level in the std log format #9138

other interesting new features

hash commit PR
e251f3a0b Change type of parameter default values to Option<Value> #8940
c422c6cc3 Fix completion on $nu to show correct menus #8919
44493dac5 Add extern def which allows raw arguments #8956
fb10e1dfc add --ide-ast for a simplistic ast for editors #8995
4ca47258a Add --redirect-combine option to run-external #8918
e590d3587 enable history isolation #9063
d45e9671d Suggest existing variables on not found #8902
a7c1b363e Don't run .sh files with /bin/sh #8951
e4625acf2 support bracketed paste #8907
b82e279f9 REFACTOR: remove deprecated commands (old-alias) #9056
10d65b611 adds a list subcommand to input (interactive selections) #8963

Breaking changes

  • #8940 Change type of parameter default values to Option<Value>
  • #9007 Fix unexpected flattening of data by par-each (Issue #8497)
  • #9056 REFACTOR: remove deprecated commands (old-alias)

Full changelog

Nushell

Extension

Documentation

Nu_Scripts

reedline