Nushell 0.30
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.30 of Nu. This release adds big improvements to performance and simplicity of the engine.
Where to get it
Nu 0.30 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
.
If you'd like to try the experimental paging feature in this release, you can install with cargo install nu --features=table-pager
.
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
Performance improvements (sophiajt)
Nu, now noticeably faster
The 0.30 release is the first to include the engine-p experimental approaches that we mentioned in the last release. These changes streamline the engine, moving it from async streams to iterators, simplifying how commands handle their arguments, and how outputs are passed from one command to the next.
The end result is an engine that is both simpler and much faster. In the above example we run two different benchmarks. The first is a run of this script in the Nushell script repo. The second is a tight processing loop over many 10 million small records: echo 1..10000000 | prepend 777 | append 555 | where $it > 7 | length
.
Though the performance numbers are still early, they're extremely promising.
New built-in variable $scope
(stevenbarragan, fdncred)
We're experimenting with a new built-in variable called $scope
. This gives you access to definitions in scope, including variables.
New Commands
math sqrt
(luccasmmg)any?
andall?
(andrasio)path parse
,path join
, andpath split
(kubouch)into int
(efx)query json
(fdncred). This is a new experimental query function as we explore how we'd like to do data querying in nushell.
Documentation (andrasio)
We have a new guide on how to create Nushell commands.
Improvements (LhKipp, luccasmmg, waldyrious, ilius, fdncred, andrasio, DonnutPanic, ammrkn, sophiajt, schrieveslaach, daschl, nightscape)
- Lots of internal optimization updates: 1, 2, 3, 4, 5
- Now appends to the history instead of replacing it
- API improvements to allow embedded nushell to have custom commands
- Internal implementation improvements to
which
, toall
, tomath
commands, toto
andfrom
commands, tocompact
- Updated
echo ..
to no longer prints integers - Removed help flags from the
$scope.commands
display - Removed the dupes in get_commands/get_command_names
- Fixes to viewing Value as a filepath
- Move arg deserialization out of
str
- Cleaned up error handling
- Fixes to how rest arguments are handled
- Fixes to
ansi rgb fg
- Updated the default prompt
- Autoview and table now read from the in-memory config
- Do not store whitespace entries in the history
- Simplified internal handling of the runnable context
- Fixed external output busy-waiting
- Remove
rm
's trash flag if it's not supported - Fixed a panic when timestamp is out of range
- Sysinfo dependency has been updated
- Config commands are now more unified internally
- Added TiB and PiB units
- Improved auto-suggestion for aliases and custom commands
- More logging and tests
- Now parses decimal units
- Use one main function to run scripts
- Fixed errors when deleting a FIFO
- Fixed capitalizations of Unicode
- Fixes to path sync'ing, more path fixes, and improvements to dynamic blocks
Breaking changes
Removed help shell
We have removed the help shell to simplify code.
Removed ambiguous units
We've also removed yr
and mon
units because their meaning was too confusing.
New set of default features
The default feature list is now simpler. This means that doing a cargo install
will give you fewer of the plugins than previously. We're still working to refine this list. Please do give feedback if these changes negatively impact you.
Looking ahead
The new engine and performance improvements should open the door for even more improvements in the future. These improvements also make it easier to explore adding more sophisticated completion logic in the future, as that logic could be written in Nushell itself.