Nushell 0.79
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.79 of Nu. This release adds a standard library written in nu itself and enhanced IDE support.
Where to get it
Nu 0.79 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
Standard library (@amtoine, @bobhy, @fdncred, @presidento, ...)
This is it. We finally release the standard library with this 0.79
! It's been on the mind of the core team of Nushell for some time and it was made real between the two releases.
But first of all... what is the standard library?
The nushell standard library is a collection of nushell scripts that are automatically loaded in the nushell binary and reachable via the use
command without any additional setup.
💡 Note some of the commands from the standard library are
use
d without human intervention as part of what we call the prelude.As said above, the other commands are available with the
use
command. The goal of this library is, as its name suggests, to provide a standard experience and a standardized set of commands and tools to any Nushell user. Instd
, one can find things like
- a test framework to write robust Nushell scripts, modules and libraries
- implementation of builtin commands once written in
rust
- logging commands with several log levels
- ...
💡 Note yes, you heard right, in the future, the standard library might become a sanctuary for non-time-critical commands that were once written in
rust
as part of the built-in set of commands!Right now, we are actively trying to move the
help
commands from thenushell
core implementation to the library.
With this release, the library comes with the following custom commands:
module | description | commands |
---|---|---|
std assert | a set of commands to write tests | assert , assert equal , assert error , assert greater , assert greater or equal , assert length , assert less , assert less or equal , assert not equal , assert skip , assert str contains |
std dirs | a re-implementation of the shells commands | dirs add , dirs drop , dirs next , dirs prev , dirs show |
std help | a Nushell implementation of the built-in commands | help , help aliases , help commands , help externs , help modules , help operators |
std iter | an extension of built-in commands to iterate over data | iter filter-map , iter find , iter intersperse , iter scan |
std log | never miss something in your scripts | log critical , log debug , log error , log info , log warning |
xml module | tools to interact with Xml data | xaccess , xinsert , xtype , xupdate |
- some other commands live under the
std
namespace, without any module:clip
,path add
andrun-tests
TL;DR
As there has been quite a lot of contributions already (see the 50 closed PRs at the time i'm writing this 😮), i'm just gonna give some hints and links in this release note, leaving the rest to the amazing work of other contributors who wrote parts of the lib and its documents (shout out to @bobhy, @fdncred and @presidento
- the library can be used and tested with
use std # will load the whole library under the `std` namespace
use std * # - - - - - without the `std` prefix
or use direct imports, such as
use std 'dirs show'
- one can follow the activity of the library in the roadmap
- the library comes with a test framework; see the Testing your Nushell code chapter of the book
- the long term information, changelog and updates shall be found in the Standard library chapter of the Nushell book
- if you are a contributor willing to help out, everything happens in the
nu-std
crate, especially theCONTRIBUTING.md
document which explains all there is to know about "developing withstd
" in great details.
If, for some reason, you want to load Nushell without the standard library, start nu
with the --no-std-lib
. This can be the case if you find the startup times much longer than before. We're aiming to improve the loading speed in the future.
enhanced IDE support in our VS code extension (Sophia, fdncred)
Nushell now has a first LSP (Language Server Protocol) implementation with a VSCode integration. If you install the latest version of our VSCode plugin, you'll see hovers, inlays, tooltips, error squigglies and other features. We are still very early in the LSP development, but the extension is already very usable and definitely moves the experience of writing Nu code to another level!
While currently we have only VSCode integration, the server itself is standalone and we welcome projects adding the LSP support to more editors.
atuin
now supports Nushell
Thanks to @stevenxxiu you can now use atuin
with Nushell. We are happy to see Nushell supported by more projects and we welcome PRs adding more integrations.
Relaxed parsing rules (Sophia)
We listened to your feedback around the syntax changes introduced with 0.78 and decided to revert to the old behavior around the parsing rules for numeric literals as well as the compulsory ||
for closures.
Removed old alias implementation (kubouch)
While there are still some missing pieces, we removed the old alias implementation. This means that old-alias
is no longer available. We decided to remove it to clean up the code. It makes further fixes to aliases easier as you do not need to remember which alias implementation a piece of code belongs to.
There are two notable missing features from the old aliases:
- Missing completions with external completers.
- Most parser keywords (such as
source
) cannot be aliased but adding support for aliasing them should be possible in most cases. - Not possible to alias with environment shorthands (e.g.,
alias foo = FOO=bar spam
) - Some presentation issues, such as the output of
which
and the aliasusage
pointing at the aliased call instead of the alias itself.
Changes to default files locations (ito-hiroki)
$nu.config-path
and $nu.env-path
are now set based on --config
and --env-config
flags passed to Nushell and also use the path after resolving symlinks. This means that they no longer guarantee pointing at the default Nushell's config directory. To be able to refer to the default config directory, $nu.default-config-dir
was added and used in default env.nu
to always point NU_LIB_DIRS
to the scripts
directory under the default config directory.
Related to that, $env.CURRENT_FILE
was added to be able to show the currently evaluated file.
Breaking changes
- #8797
old-alias
is no longer available - #8724
str index-of -r
now uses ranges - #8792
config nu
andconfig env
now open$nu.config-path
and$nu.env-path
, respectively. - #8779 Aliasing math expressions now shows error immediately instead of failing silently and showing a confusing error later.
- #8917
exec
inherits Nushell's environment variables - #8887
NU_LIB_DIRS
definition inenv.nu
changed
Full changelog
Nushell
- sholderbach created Bump to
0.79.1
dev version, and Pinreedline
to0.19.0
release, and Bump version for0.79.0
release, and Run coverage immediately, and Reenable CI coverage, and Fix span of multibyte short flags, and Move CLI related commands tonu-cli
, and Follow up #8758 with a style fix - hustcer created Add npm installation instruction, and Upgrade to nu v0.78 for binaries release workflow
- rgwood created Tweak run-external signature so command must be a string, and Upgrade
open
crate to fix WSL bug - fdncred created use record separator
\x1e
forinclude_path
, and allowfind
command to look in specified columns only, and fix reedline breaking changes due to PR562, and fix bug with include_path -I parameter, and allow custom commands to show up in$nu.scope.commands
better, and remove debug print bug, and Update issue templates, and limit the ide-check error amount, and change include dirs separator to colon, and make inlays show type instead of shape - pingiun created Set override locale in toolkit, and Set env in exec command, and Add $env.CURRENT_FILE variable, and Add $nu.current-exe variable, and Add ppid example for ps
- stevenxxiu created fix: set the initial repl cursor pos, fixes #8943
- WindSoilder created using ratatui instead of tui, and
rm
: enable trash flag on android and ios platrofm, and optimize hash md5 for binary input, and Remove autoprinting offor
loop, and Update crossterm version to 0.26, andupdate
command: make$in
(in closure body) takes cell path - sophiajt created Reuse the cached parse results of parsed files, and Hopefully speedup startup, and Allocate less when doing a capture discovery, and Improve hovers, including for custom commands, and Make -I take in a ;-delimited list, and Adds multi-file support to IDE support, and Relax the closure syntax, highlight differently, and Revert numberlike parsing restriction, and Add option to not load std-lib. Default tests to not use std-lib, and Only add the std lib files once, and improve operation mismatch errors, and Fix parser recovery after error, and Refactor to support multiple parse errors
- 1Kinoti created unify the
*-BuiltinVar
parser errors, and addfilter-map
command tostd iter
, and additer
module to standard library, and rename toolkit'sset-git-hooks
tosetup-git-hooks
, and uselet-else
syntax where possible, and allow register to accept a const argument - presidento created Fix
into decimal
command category, and std: remove logging example, and Move unit test runner to standard library, and stdlib test runner: implementsetup
andteardown
commands to unit tests, and Stdlib: use default color for info log level, and stdlib: addassert skip
command to skip test case - amtoine created refactor the
CONTRIBUTING.md
guidelines fornu-std
, and stdlib: fix theclip
command with integer values, and FEATURE: do not use theme-independent colors in the default configs, and stdlib: make helper modules available in std, and remove the "MODULE NOT FOUND" print from the parser, and stdlib: refactor into a multi-module library, and stdlib: use the loaded library in tests and updateREADME
, and stdlib: add completion tohelp
commands, and FEATURE: make the link in theansi
extra usage an ANSI link, and add the standardhelp
to the prelude asstd help ...
, and FIX: load the library before anything else, and stdlib: make the library a standalone crate, and DEV: make all "comments" real md comments in the PR template - vaishaag created Fix strange error on unbalanced curly braces, and Correct error description for unknown external commands
- bobhy created
std run-tests
: Rename --command switch to --test; and likewise in --list output, and Replace #8824: CONTRIBUTING.md for standard library, and Pick up fix in dtparse for nanosec truncation noted at bottom of #8337 - Mehrbod2002 created Apply
continue
toeach
- ito-hiroki created Change
NU_LIB_DIRS
not to depend on$nu.config-path
, and Fixconfig {nu,env}
to open$nu.{config,env}-file
- federicoviscomi created Parser panic for signature with multibyte char for short flag #8821
- nibon7 created Fix process_range on 32-bit platforms
- dependabot[bot] created Bump sys-locale from 0.2.4 to 0.3.0, and Bump winreg from 0.11.0 to 0.50.0, and Bump rstest from 0.16.0 to 0.17.0, and Bump umask from 2.0.0 to 2.1.0, and Bump miette from 5.6.0 to 5.7.0, and Bump tempfile from 3.4.0 to 3.5.0
- MariaSolOs created Add git hooks for formatting and running
clippy
, and Usepretty_assertions
in the root crate, and Allow arguments for the last flag in short flag batch - stormasm created remove nu_cli crate dependency from nu_std, and add LICENSE to nu-std
- kubouch created Remove old alias implementation, and Remove parser keywords label from commands that do not need it, and Aliasing math expression shows error earlier, and Allow multi-word aliases
- harshalchaudhari35 created fix(nu-command/tests): further remove unnecessary pipeline() and cwd()
- fnordpig created Add regex separators for split row/list/column
- Sygmei created feat: added
items
command for Records - amtoine created standard library: implement
help
commands with$nu
- bobhy created range operator accepts bot..=top as well as bot..top
Extension
- fdncred created update changelog, and update syntax for 0.79.0, and change the
:
separator to a record separator\x1e
, and add folding regions, and rename to match readme, and update readme, and update example generation script and examples, and add a throttle timeout so that we don't update to frequently, and add timing to more server functions, and update vscode launch json so we can see debug messages from client, and update files to model after jakt, and limit the amount of errors returned by ide-check, and respect the setting to enable or disable hints/inlays, and change include dir separator from semicolon to colon, and revert vscodeignore changes, and add include dirs setting to extension, and utilize nushell IDE features with built-in vscode LSP functionality - glcraft created Add underscore separator in numbers
- sophiajt created Have launch build instead of watch, and Delete tmp file on exit, and Limit buffer calculation to buffer size not text size, and Move runCompiler to be in charge of the script include flag, and Add support for -I call to nushell
Documentation
- hustcer created Refresh command docs for nu v0.79.0, and Add npm installation instruction, and Fix i18n script for nu v0.78, and Update some docs for nu v0.78
- dependabot[bot] created Bump yaml from 2.1.3 to 2.2.2
- Ifthel created Use explicit printing in custom_commands.md, and Improve
insert
andupdate
examples in working_with_lists.md, and Update dataframe examples, and Fix ranges instr substring
examples - amtoine created add the note about the standard library
- kai-tub created Update standard_library.md
- MariaSolOs created Fix some typos and other nits to the variable documentation
- 1Kinoti created update variable documentation
- rgwood created Mention optional cell path members
- presidento created Dataframes, and Add info about echo, print and log commands to the book, and Update testing chapter
- maxim-uvarov created fixing typo in 2023-04-04-nushell_0_78.md
- D3V1LC0D3R created Update working_with_tables.md to include reject
- Kissaki created Improve misleading text format on note
- sholderbach created Release notes for
0.79.0
release. - uselesspseudo created Fix old keybding for help menu
- efulleratindeed created Fix syntax error in blog post
- pingiun created Add ppid to ps examples
- SamirTalwar created Update the Direnv recipe to use a block, rather than
code:
Nu_Scripts
- fdncred created some cleanup, and update progress meter to work with latest nushell, and update sg.nu to print again, and some fun iterm2 drawing, and update range syntax in str substring usage, and move assets so they're more accessible, and a little cleanup, and fix some quoting bugs that the lsp found
- sholderbach created Include
nu-std
in the release script - fj0r created prompt powerline support color theme, and refactor: unified configuration environment variables, and prompt, and upgrade to 0.78: git, ssh, docker, kubernetes
- Darkness9724 created Fix wolframalpha.nu
- RickCogley created Enhance by getting length of symbol string, and Add nupass.nu password generator
- nils-degroot created Added completions for pass
- D3V1LC0D3R created Update nuschiit.nu (used deprecated fetch), and a small query web showcase with unscramble.me
- TuffenDuffen created Fix issue with open in yarn completions
- Hofer-Julian created conda: Add
||
to closure, and Speeding up activating conda environment - fnuttens created Add --all aliases for exa, and Add exa aliases
- Kissaki created Fix winget-completions.nu for nushell v0.78 closure syntax change
- Tiggax created Fixed support for env files
- melMass created refactor: ✨
reedline
- sholderbach created Bump version for 0.19 release
- nibon7 created Restore the cursor shape when reedline exits
- stevenxxiu created feat: add
current_insertion_point()
to return the current insertion point of the input buffer - WindSoilder created support bracketed paste, and Update crossterm to version 0.26.1
- xiuxiu62 created re-export crossterm::style::Color for custom prompt implementations
- fdncred created Allow history searching via session id