Nushell 0.89.0
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.89.0 of Nu. This release adds spreading of argument lists to command calls, better editor integration, and many bugfixes.
Where to get it
Nu 0.89.0 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>
.
Table of content
- Nushell 0.89.0
- Where to get it
- Table of content
- Themes of this release / New features [toc]
- Breaking changes [toc]
- Full changelog [toc]
- Breaking changes
- Full changelog
Themes of this release / New features [toc]
(Update 19.01.2024, Breaking change!) Removal of directory module auto-exports [toc]
Release note gremlin hid this note from us and we forgot to add it. We're sorry!
@amtoine in #11157 removed the directory module autoexport of all .nu files inside the directory. This removes the ability to "dump .nu files into a directory" and have them automatically exported. Previously, if you had the following file structure:
spam
├── bar.nu
├── baz.nu
├── foo.nu
└── mod.nu
all you had to do was to call use spam
and the .nu
files would be added as submodules of spam
. Now, to achieve the same effect, you would need to put
export module foo.nu
export module bar.nu
export module baz.nu
to the mod.nu
.
This change adds one manual step you need to perform to export submodules from modules, but it gives you more control and confidence. In the previous system, .nu files would be auto-exported even if you didn't want to! For example, to prevent baz.nu
from being auto-exported, you would need to put it inside a new directory that doesn't contain mod.nu
(and thus is not considered a Nushell module), like this:
spam
├── bar.nu
├── foo.nu
└── utils
└── baz.nu
We felt like this workaround was quite cumbersome, and the implicit behavior wasn't in the disciplined spirit of Nushell. Rather than having this auto-exporting as an implicit feature of use
, we're currently exploring ways to allow doing it explicitly, for example with a separate command.
Spread operator for commands
In #11289, @ysthakur implemented a spread operator for calling commands (previously, it could only be used in list and record literals).
Now, if you have a command with a rest parameter:
def foo [ ...args ] { $args | to nuon }
You can spread arguments to it like this:
> let x = [foo bar baz]
> foo ...[1 2] ...$x
[1, 2, foo, bar, baz]
See the docs for more information.
Editor Improvements
Thanks to @AucaCoyan's #11284 and #11320, Nushell's VSCode extension and builtin LSP server now show the same command's message on hover as abtained with help
in Nushell.
Deprecation of --flag: bool
In the last release, we allowed passing flags dynamically:
def spam [--foo] {
print $foo
}
let value = false
spam --foo=$value
# prints false
However, it is easy to confuse with --foo: bool
. To disambiguate, we are deprecating the setting optional parameters with boolean type (--flag: bool
). Doing so will trigger a warning:
def spam [--foo: bool] { $foo }
Error: × Deprecated: --flag: bool
╭─[entry #3:1:1]
1 │ def spam [--foo: bool] { $foo }
· ──┬─
· ╰── `--flag: bool` is deprecated and will be removed in 0.90. Please use `--flag` instead, more info: https://www.nushell.sh/book/custom_commands.html
╰────
Our set of commands is evolving [toc]
As usual, new release rhyms with changes to commands!
New commands [toc]
ulimit
for Unix-based systems
The new ulimit
command added by @nibon7 can now be used on Unix-based systems for setting or checking the resource limits, such as the stack size or virtual memory size, for the current user.
To list the current limits:
ulimit -a
Setting the limits is done via flags available in help ulimit
.
Breaking changes [toc]
- #11131 remove
std clip
- #11414 Lock out new direct construction of
Record
- #11367 Remove
Expr::MatchPattern
- #11355 Rename extra's
format
toformat pattern
- #11356 Remove
Value::MatchPattern
- #11313 Bubble up errors passed to
complete
- #11157 disable directory submodule auto export
Full changelog [toc]
Nushell
- amtoine created
- abusch created
- WindSoilder created
- NotLebedev created
- nibon7 created
- Bump terminal_size to 0.3
- Fix cross building for target x86_64-pc-windows-gnu on linux
- Bump sysinfo from 0.29 to 0.30
- Replace
winapi
withwindows
- Don't panic when
http_client
fails - Don't create a thread if stderr_stream is None
- Fix an infinite loop if the input stream and output stream are the same
- Bump windows from 0.48.0 to 0.52.0
- Fix build for BSDs
- Allow
filesize
type as a valid limit value - Allow
int
type as a valid limit value - Add ulimit command
- yukitomoda created
- hustcer created
- rsteube created
- fdncred created
- ysthakur created
- cyradotpink created
- SebastianIonel created
- IanManske created
- sholderbach created
- Simplify the feature gates for
stor
commands - Make polars deps optional for
cargo test --all
- Lock out new direct construction of
Record
- Check for clean repo after tests
- Bump reedline development version
- Fix sandboxing of redirection tests
- Bump
fancy-regex
to single0.12.0
version - Construct
Record
s only through checked helpers - Expand the workspace
members
inCargo.toml
- Properly update to the reedline repo patch
- Bump version to
0.88.2
- Bump version to
0.88.1
- Revert lock file changes due to openssl build fail
- Bump version for
0.88.0
release
- Simplify the feature gates for
- lavafroth created
- AucaCoyan created
- hardfau1t created
- 0323pin created
- stormasm created
- KAAtheWiseGit created
- crides created
- CAD97 created
- Hofer-Julian created
- ayax79 created
- drbrain created
- AntoineSebert created
- sophiajt created
Documentation
- amtoine created
- TWSiO created
- yukitomoda created
- hustcer created
- aserowy created
- YukiOnodera created
- zolodev created
- ysthakur created
- frogshead created
- Trent-Fellbootman created
- WindSoilder created
- app/github-actions created
- MediosZ created
- braddunbar created
- IndigoLily created
- Tamnac created
- mb21 created
- RGBCube created
Nu_Scripts
- fj0r created
- bobhy created
- AucaCoyan created
- edhowland created
- frogshead created
- robbienohra created
- adrian5 created
- kjelly created
- zyfmix created
- RGBCube created
- TeaDrinkingProgrammer created
Reedline
- WindSoilder created
- sholderbach created
- nibon7 created
- danielsomerfield created