Nushell 0.80
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.80 of Nu. This release adds record type annotations, modules from directories, and improvements to the standard library.
Where to get it
Nu 0.80 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>
.
Themes of this release / New features
Record type annotations (@1Kinoti)
Starting with this release, you can add more information about the type of a record your command expects. For example:
def okay [person: record<name: string age: int>] {}
The above will require two fields to be present, a name
that's a string
, and an age
that's an int
. The current version requires that the record has exactly these fields, though we may loosen this in future releases to allow for structural subtyping.
Modules from directories (@Kubouch)
It is now possible to create a module from a directory. The directory must contain mod.nu
and all other .nu files are added as a submodule of the module. This allows some traditional shell patterns such as dumping completion files into a directory to be loaded automatically. Check out the newly updated book chapter for more details and examples.
The enabling feature for module directories was organizing modules into submodule structure instead of solely relying on re-importing symbols with export use
. module
and especially export module
have been added as a result of this change. While not immediately visible, the module update allows for cleaner submodule organization without relying on re-exporting symbols with export use
. Since modules are now aware of their submodules, in the future we hope to improve discoverability of definitions within modules, enhancing our IDE support (such as our LSP).
Stdlib update ([@amtoine, @EmilySeville7cfg, @skelly37, @YummyOreo][std-lib PRs])
hash | commit | PR |
---|---|---|
3268ecd11 | FEATURE: add the bench command to the standard library | #8969 |
155de9f6f | Added log custom command & exported log levels | #9055 |
edb61fc1d | Try to show help pages for external commands w/ help command | #9025 |
7a945848d | swap the date and the log level in the std log format | #9138 |
other interesting new features
hash | commit | PR |
---|---|---|
e251f3a0b | Change type of parameter default values to Option<Value> | #8940 |
c422c6cc3 | Fix completion on $nu to show correct menus | #8919 |
44493dac5 | Add extern def which allows raw arguments | #8956 |
fb10e1dfc | add --ide-ast for a simplistic ast for editors | #8995 |
4ca47258a | Add --redirect-combine option to run-external | #8918 |
e590d3587 | enable history isolation | #9063 |
d45e9671d | Suggest existing variables on not found | #8902 |
a7c1b363e | Don't run .sh files with /bin/sh | #8951 |
e4625acf2 | support bracketed paste | #8907 |
b82e279f9 | REFACTOR: remove deprecated commands (old-alias ) | #9056 |
10d65b611 | adds a list subcommand to input (interactive selections) | #8963 |
Breaking changes
- #8940 Change type of parameter default values to
Option<Value>
- #9007 Fix unexpected flattening of data by par-each (Issue #8497)
- #9056 REFACTOR: remove deprecated commands (
old-alias
)
Full changelog
Nushell
- sholderbach created Bump version for 0.80.0 release, and Pin reedline to
0.19.1
for 0.80 release - stormasm created document how to run dataframe tests as well
- kubouch created Allow recursive module dirs; Require mod.nu in dirs, and Reuse parsed modules, and Fix exported module not found, and Allow creating modules from directories
- amtoine created fix the span of the global
std help
item, and swap the date and the log level in thestd log
format, and FEATURE: add amain
command totoolkit.nu
, and REFACTOR: makeinput list
a tiny bit tighter, and FIX: have consistent errors betweenstd help
andstd help ...
, and REFACTOR: fix typos and simplify externalstd help
, and passstd bench
intotable -e
in the example, and FIX: add a space after the default left prompt, and REFACTOR: movesource
out of deprecated commands, and REFACTOR: remove deprecated commands (old-alias
), and FEATURE: return tables withstd help ... --find ...
, and FIX: correct bad span instd help
errors, and FIX: filter thestd help ...
by name, usage and search terms, and FIX: give same order instd help ...
as inhelp ...
, and REFACTOR: have a singlestd
loading call, and TRIAGE: add theneeds-triage
to allISSUE_TEMPLATE
s, and FEATURE: add--expand
tostd clip
, and FEATURE: add thebench
command to the standard library, and REFACTOR: remove the shell commands, and REFACTOR: move the banner from therust
source to the standard library - sophiajt created remove a few unnecessary allocations
- fdncred created add dataframe support to toolkit, and Update default_env.nu to work with windows, and add a negation glob option to the glob command, and resolve standard library before ide commands, and update nu-glob based on latest glob 0.3.1 changes, and enable history isolation, and Update rust-toolchain.toml to 1.67.1, and add
--ide-ast
for a simplistic ast for editors - juanPabloMiceli created Fix find -v command on tables (issue #9043), and Fix negative precision round with ints (issue #9049)
- michaeljohnalbers created Ensure consistent map ordering when reading YAML
- bobhy created Parameter defaults to $nu.scope.commands
- Hofer-Julian created Start to move to polars 0.29, and Update polars to 0.28
- tesla232 created Span fixes during duration conversion
- zhiburt created nu-explore: Fix repeated char issue in cmdline, and nu-explore: Fix pipeline rendering, and Fix #9038
- 1Kinoti created add more commands to
std iter
, and make the pattern-matcher and eval engine use the same unit computation, and improve error when name and parameters are not space-separated - melMass created chore: ✨ enable setup-git-hooks on windows, and adds a list subcommand to input (interactive selections)
- EmilySeville7cfg created FEATURE: highlight some prompt parts, and FEATURE: move common functionality to subroutine in
build-all-windows.cmd
, and FEATURE: formatstd log
and add--short
option - Mehrbod2002 created Feat: listen for signal on glob command
- WindSoilder created Fix overlay's help message lead to internal error, and support bracketed paste
- MariaSolOs created Change type of flag defaults to
Option<Value>
- skelly37 created Added
log custom
command & exported log levels - stevenxxiu created fix: use
buffer.len()
instead ofcursor_pos
, so the.expect()
isn't useless, and fix: fix cursor position when cursor is at the end of the commandline - YummyOreo created Try to show help pages for external commands w/
help
command - TrMen created Add more examples to
help use
- hustcer created Remove npm install instruction
- rgwood created Slim down tests
- ErichDonGubler created feat(rm)!: use arg. spans for I/O errors
- pingiun created Add extern def which allows raw arguments, and Don't run .sh files with /bin/sh, and Add --redirect-combine option to run-external
- schicks created Suggest existing variables on not found
Extension
- EmilySeville7cfg created feat(snippets): markdown doc sections, and feat(snippets): completions, and Feature: add date format snippets, and Feature/add remaining snippets, and Feature/update snippets
- fdncred created update changelog, and update version and changelog
Documentation
- mrkkrp created Minor corrections in variables_and_subexpressions.md
- VuiMuich created small typo in
dataframes.md
- amtoine created add a bunch of interesting PR links, and FIX: add prettier
std
commands format in 0.79 changelog, and fix the "std
import" section of the 0.79 changelog - tzemanovic created book/coming_from_bash - s/hide/hide-env
- maxomatic458 created update link to job.nu file
- PhilVoel created Fixed link in design_notes to how_nushell_code_gets_run
- Askerad created Fixing Tiny Typo - Update aliases.md
- hustcer created Update npm install instruction
Nu_Scripts
- EmilySeville7cfg created Fix: remaining aliases, and feat(aliases): reformat and use long options, and feat(module): add random-list, and Feature: clean-up completion directory, and feat(nano): add completions
- Tiggax created Added typst completion script.
- nullishamy created fix: just completions
- fj0r created gp: run
git fetch
beforegit push
orgit pull
, and kubernetes completion of jsonpath, and clean up kubernetes.nu, and improve kconf import, and rename registry list to registry show, and Fix the problem that the file KUBECONFIG points does not exist, and refactor powerline script, and optimize kube_stat with ensure-cache, and refactor left_prompt decorator logic, and atuin - zsehanovic created fix git aliases
- dschrempf created ultimate_extractor: various fixes
- maxim-uvarov created the function to display bars of given percentage from given width
- RickCogley created Nupass par each threads 20230504, and Nupass performance 20230502, and Nupass refactor 20230501
- LiHRaM created Fix npm-completions: move extern declaration below dependent declarations
- amtoine created REFACTOR: unify git modules and aliases
reedline
- TrMen created Allow binding of
CTRL+ALT+<c>
,SHIFT+<c>
andCTRL+ALT+SHIFT+<c>
- WindSoilder created fix bracketed paste
- samlich created History filter