Nushell 0.69

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 version 0.69 of Nu. This release includes bugfixes and improvements to existing languages.

Where to get it

Nu 0.69 is available as pre-built binariesopen in new window or from crates.ioopen in new window. Note: this release is officially "0.69.1" because of a last-minute issue that was found and fixed. If you have Rust installed you can install it using cargo install nu.

If you want all the built-in goodies, you can install cargo install nu --features=extra.

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

Finishing the rework of modules and environment (WindSoilder, kubouchopen in new window)

If you followed the development since the last release, you might have noticed we successfully applied "the method of dead ends" pioneered by Jára Cimrmanopen in new window: "Somebody had to probe this dead end of human knowledge and announce to the world: Not this way, friends!" In short, the source-env experiment did not work out as planned. We hoped to allow to call source-env with dynamic paths which, however, proved unfeasible. Therefore, in this release, we remove all notions of source-env from Nushell and instead use will be used activate the module's environment. Any call to use will run the module's export-env { ... } block (if there is one) and keep its environment. A positive side of it is that one call of use is enough to import both commands/aliases and the environment, there is no need to call two separate commands as we planned for source-env.

We're also keeping the source command for now, as well as the current config file format. One reason is that we want to first investigate whether it is possible to export also regular variables from modules and whether we can use the module keyword inside modules. However, the use of modules is still preferred over source as it will become the default way in the future.

Summary of deprecations

Here is a recap of the table posted in the previous release post with updated entries.

commandpre-previous release (0.67)previous release (0.68)this release (0.69)
sourceimports everything into the current scopesame (deprecated)same (deprecated)
source-envN/Aimports environment variablesremoved
useimports environment variables, commands and aliasessamesame
hidehides environment variables, commands and aliasessamehides only commands and aliases*
hide-envhides environment variablessamesame
export envdefines a single environment variable in a modulesameremoved
export-envN/A(in a module) defines the environment for the whole modulesame
export-envN/A(in a script) when evaluated, preserves the environment from the blocksame
export ...only allowed in a moduleallowed in a script as wellsame
config.nuplain scriptplain scriptplain script
env.nuplain scriptplain scriptplain script
login.nuplain scriptplain scriptplain script
  • Technically, hide still hides environment variables but it works in a "compatibility mode" that is intended to only serve its purpose in the virtualenv activation script. As soon as the virtualenv integration gets updated, hiding environment variables with hide will be removed completely.

Upcoming virtualenv activation changes (kubouch)

To reflect the recent changes to the module environment, we are changing the virtualenv integration to use overlays. This will come in effect as soon as this PRopen in new window gets merged. In practice, this means that instead of source activate.nu, you'll use overlay use activate.nu, deactivate will work the same.

Under the hood, calling overlay use activate.nu will activate the activate overlay and deactivate is just an alias for calling overlay hide activate. If you wish, you can manually name the overlay, for example overlay use activate.nu as spam, but then you'd need to remove it with overlay hide spam instead of deactivate.

Grammar Experiments (JT)

We've recently also started working on some improvements to Nushell's syntax. While these aren't part of Nushell 0.69, you can try this experimental syntax in our new grammaropen in new window repo. Some experiments we're looking into:

Traditional function definition syntax

def foo(x: int) { ... }

Traditional function call syntax

foo(3)

And much more. We're hoping to talk more about these experiments as they mature.

Breaking changes

We found a regression in the correctness of the -d and -t flags of touch. To get the release out, we've removed these flags, but hope to replace them with correct implementations in the future.

We also removed support for duration literals above weeks, including month, year, and decade literals. These were found to be confusing as it's unclear what a duration of a month is (30 days? 31 days?)

The str collect command is now str join.

Next Steps

We've been progressing with our design towards 0.80 as outlined in this Notion pageopen in new window.

Some time was spent trying out possible new syntax directions but we were not confident to release them yet. In the next release we'll see a removal of features deprecated in this release and we'll continue to push ahead for the 0.80.

Full changelog

Nushell

Extension

Documentation

Nu_Scripts

reedline