# Nushell 0.20
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.20 of Nu. In this version, we're introducing some new features for working with rows, improvements to completions, and more.
# Where to get it
Nu 0.20 is available as pre-built binaries (opens new window) or from crates.io (opens new window). 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
.
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
# New functionality
# each group
and each window
(ritobanrc)
With 0.20, you can now work with groups of rows at a time easier than ever before.
For example, let's say you have a table like this:
───┬───────┬─────
# │ name │ age
───┼───────┼─────
0 │ Joe │ 30
1 │ Fred │ 40
2 │ Sally │ 40
3 │ Sean │ 42
4 │ Gram │ 66
5 │ Todd │ 1
───┴───────┴─────
And you wanted to take three rows at a time, and sum the ages. You can now do this using:
... | each group 3 { get age | math sum }
───┬─────
0 │ 110
1 │ 109
───┴─────
Or, you can slide a "window" over the data, looking at multiple rows at a time. Let's slide a window of two rows, so that we look at each pair. We can use this to average the adjacent rows:
... | each window 2 { get age | math avg }
───┬─────────
0 │ 35.0000
1 │ 40.0000
2 │ 41.0000
3 │ 54.0000
4 │ 33.5000
───┴─────────
# Completion improvements (thegedge, rezural)
The new completer received a lot of bugfixes (opens new window), more fixes (opens new window), and yet more fixes (opens new window) since its initial release with 0.19. We're continuing to improve this experience further.
Completions can now be case-insensitive (opens new window). This is especially useful for platforms where filepaths are case-insensitive.
# Command Improvements
NEW
random integer
(opens new window) - create random integers (smaydew)NEW
exec
(opens new window) - on Unix-based systems with exec support, you can now call the built-inexec
command (almindor)NEW
mod
(opens new window) - a new modulo operator (jonathandturner)mv
now uses thefs_extra
crate for better recursive moves (opens new window) (almindor)More table themes (fdncred)
ls -l
now also lists the number of links (opens new window) (gillespiecd)str substring
can now optionally take a range (opens new window) (defstryker)char
gets support for weather characters (opens new window) (fdncred)Ranges can now start or end with variables (opens new window) and can have decimal numbers as boundaries (opens new window) (jonathandturner)
Ranges can now also be exclusive (opens new window) using the
x..<y
syntax (radekvit)ps -l
now shows cpu time (opens new window) (gillespiecd)with-env
can now accept multiple variables (opens new window) (itn3000)math avg
will now also work with durations (opens new window) (gorogoroumaru)reduce
can now work with table values (opens new window) (andrasio)The active shell in
shells
is now more clearly shown (opens new window) (gillespiecd)sleep
now respects Ctrl+C (opens new window) and can pass along the output (opens new window) (radekvit)str trim
andtrim
are merged (opens new window) (gillespiecd and radekvit)str find-replace
can now global search/replace (opens new window) (fdncred)open
now only streams for non-files and large files (opens new window) (jonathandturner)If supported on the platform,
benchmark
now gives user/system/idle times as well (opens new window) (radekvit)Ctrl+D now exits the current shell (opens new window) (gillespiecd)
fetch
now supports CSV MIME types (opens new window) (notryanb)
# Other improvements (fdncred, gillespiecd, lidin, andrasio, radekvit, jonathandturner, coolshaurya)
Removed unnused dependencies, cleanups to duration, some ARM incompatibilites were fixed, some Ctrl+C issues were fixed, optimized some config reading, cleanup code in get
and nu-value-ext
, rustyline was upgraded (fixing a common instability in Windows), help command
get some improvements, random integer
got some stability fixes.
# Breaking changes
# in:
and not-in:
are now in
and not-in
In working with operators, we've removed the colon from the in
and not-in
operators.
# trim
and str trim
are now just str trim
We've merged the functionality and now just have the one str trim
command.
# Locale-formatted numbers temporarily not supported
As part of updating dependencies, we've had to temporarily disable locale-formatting numbers. We hope to fix this as dependencies update to the latest versions.
# Change in config location
We've tried to use a supported 'directories' crate, which has meant having to change until we found a supported one. This, unfortunately, means that this release moves the config location again.
On macOS, config path
now points to: "$HOME/Library/Application Support/org.nushell.nu/config.toml", in 0.19.0 and earlier it was: "$HOME/Library/Preferences/org.nushell.nu/config.toml".
# Zulip chat
We're experimenting with using Zulip for our community chat and design discussions. If you want, you can try the server and tell us what you think (opens new window). If you'd rather we stick with Discord (opens new window), you can tell us that, too 😃
# Looking forward
We've put a survey to get feedback from you about Nushell (opens new window). This will help us focus our efforts in the coming releases to refactor, trim, and polish Nu. Working with a large codebase is always a challenge, and recently we've been thinking through what features really make up the "core" Nu experience and what parts can be moved outside of Nu itself. This may mean making more things plugins, cutting back on the depedencies we use, and more. Getting your feedback makes sure we have a clear picture for what the "core" of Nu is to most people.
Even if you're just curious about Nushell but aren't using it, we'd love to hear from you.