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 binaries or from crates.io. 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, kubouch)
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 Cimrman: "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.
command | pre-previous release (0.67) | previous release (0.68) | this release (0.69) |
---|---|---|---|
source | imports everything into the current scope | same (deprecated) | same (deprecated) |
source-env | N/A | imports environment variables | removed |
use | imports environment variables, commands and aliases | same | same |
hide | hides environment variables, commands and aliases | same | hides only commands and aliases* |
hide-env | hides environment variables | same | same |
export env | defines a single environment variable in a module | same | removed |
export-env | N/A | (in a module) defines the environment for the whole module | same |
export-env | N/A | (in a script) when evaluated, preserves the environment from the block | same |
export ... | only allowed in a module | allowed in a script as well | same |
config.nu | plain script | plain script | plain script |
env.nu | plain script | plain script | plain script |
login.nu | plain script | plain script | plain 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 withhide
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 PR 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 (Sophia)
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 grammar 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 page.
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
- sophiajt created bump to 0.69.1, and remove -d and -t from touch, and bump to updated reedline, and bump to 0.69, and Remove month and year duration constants, and touchup some clippy warnings in tests
- sholderbach created Clippy with the current stable toolchain, and Update reedline to better vi behavior, and Add "space" key to bind in vi normal mode, and Improve wording around
all
andany
- MichelMunoz created 6582 - Incorrect documentation for some string operations
- nibon7 created version: show built time git branch, and Apply clippy fix for rust 1.63.0, and Use style from lscolors to render the rest of the filename, and Use stripped path for lscolors to get style, and Make clickable links smarter
- WindSoilder created fix sys info mem usage, and when execute external command, escape args if possible, and Remove deprecated environment functionality
- Fl1tzi created fix issue 6602 (broken highlighting in find)
- Kangaxx-0 created [Cleanup]Nu completion unit tests, and Fix 6529 - Trim overlay name, and Add overlay use usage for 'as', and Fix 6252 by remove unit tests
- fdncred created bump pinned rust version to 1.63, and add history session command, and add history session id to $nu, and rename with_sql to query dfr, and update sql-parser crate and all the files it touches, and synchronize the db commands with file names, and update to the latest sysinfo crate, and update text in readme file, and provide a way to use sql to query dataframes
- rgwood created Fix mv data loss when changing folder case (step 1)
- dandavison created Improve
uniq --help
text, and Improve "Did you mean?" suggestions, and Reinstate the-a
short form ofsave --append
, and Revert foreground process changes to fix MacOS piping bug (less and fzf), and Don't compute 'did you mean' suggestions unless showing them to user, andstr collect
=>str join
- kubouch created Add export-env eval to use command, and Require static path for
source-env
- aroneous created Support Arrow IPC file format with dataframes
- hustcer created Bump dev version to v0.68.2
- merelymyself created default to $nothing if cellpath not found, and Stop panic when typing
module spam { export def-env
, and remove panic fromlpad
andrpad
, change truncation behaviour forlpad
- CBenoit created build: update
cpufeatures
crate - unrelentingtech created Add a 'commandline' command for manipulating the current buffer, and shell_integration: Report current working directory as OSC 7
Extension
- fdncred created Update readme screenshots, and bump version for release, and add some tweaks to the auto-generated syntax, and remove themes + cleanup, and correct syntax highlighting for block parameters
- Yethal created Updated syntax + fixed generation script
Documentation
- drbrain created Explain … for a repeating positional parameter
- tensorush created Fix built-in and plug-in typos, and Fix some typos
- WindSoilder created add background task section, and add doc about plugin name, and update plugin for newest changes
- fdncred created add a dataframe cookbook example
- hustcer created Refactor vuepress config
- apraga created Cookbook : SSH passphase management
- Yethal created Update modules.md
- dandavison created
str collect
=>str join
Nu_Scripts
- Neur1n created feat: added coloring/hl.nu, a highlighting module
- WindSoilder created add background feature
- fdncred created add cargo update completions
- FrancescElies created cargo clippy completions
- e2dk4r created custom completions: scoop: fix getting environmental variables on nu v0.68.0
- Lightfire228 created [WIP] Feature/auto venv
reedline
- sholderbach created Prepare 0.12.0 release, and List that space can be bound through
Char(' ')
, and Vi-Refactor: Properly parse motions separate from the actions, and Fix vi character search parsing, and Fix documentation string formatting and linking - fdncred created enable easier history session id conversion, and change history session_id to a systematically generated number
- jcgruenhage created Don't bundle sqlite by default
- unrelentingtech created Allow external manipulation of the command line buffer, fixes #423
- GrxE created Basic external printer