# Nushell 0.62
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 version 0.62 of Nu. This release deeper integration with SQLite, new completion logic, and much more.
# Where to get it
Nu 0.62 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
.
A note on this release: The binaries published by the Nu team now include a statically linked copy of the OpenSSL library (previously Nu used a shared library, AKA 'dynamic linking'). The goal of this change is to make Nu simpler to deploy with fewer dependencies.
This feature is enabled by the "static-link-openssl" Cargo feature, so it's easy to disable if needed when building Nu.
If you want all the built-in goodies, you can install cargo install nu --features=extra
.
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>
.
# Database connectivity (rgwood, elferherrera, fdncred)
A gap in the "Nushell story" up to this point has been that although Nushell is a language and shell focused on data, there wasn't yet any ability to query databases and work with their data. With 0.62, we take our first step in that direction.
New in this release is the db
command, which allows you to connect to a SQLite database and create a SQL query to run on it:
> db open db.sqlite
| db from table_a
| db select a
| db limit 10
| db describe
With the db open
command we open a connection to the database, then subsequent db
commands build up a query step by step. One new twist with db
for Nushell is that the query is built lazily, and will only be run once the data is needed.
Queries can also be written as raw SQL:
> db open db.sqlite | db query "SELECT a FROM table_a LIMIT 10"
And finally, the open
command has been updated to be SQLite-aware:
> open db.sqlite
In all of the queries above, db open db.sqlite
could be replaced by open db.sqlite
; open
is able to detect databases by looking at file contents.
# Full translation of the book to Chinese (hustcer)
The book is now fully translated to Chinese (zh-CN) (opens new window). Huge shout-out to hustcer for doing all the work on the translation!
# More completions (herlon214, jt)
Nushell can now complete record fields, cell paths in variables created in previous REPL runs, and more.
Starting with 0.62, Nushell will prefer to wrap filenames with spaces in backticks when completing. This allows for filenames to have single quotes, while also being compatible with upcoming improvements in filename handling.
# New commands
watch
(opens new window) can now watch a filepath and run a block if a change occurs (rgwood)
# Quality-of-life Improvements
ctrl+o
- opens your editor of choice to edit line input (elferherrera)- Make sure to set
buffer_editor
in your configuration so Nushell can find your editor
- Make sure to set
You can use
()
in create filenames. eg)ls ./($dirname)
(jt)- Note: this currently only works if the
()
isn't the start of the filepath
- Note: this currently only works if the
ctrl+c
now breaks in more cases (gipsyh)$nu.os-info
can give you information about the platform Nushell is running on. (fdncred)~user
is now a known path shorthand (merelymyself)'Errors now have helpful descriptions that will show up in the error docs. (zkat)
Nushell now has better shell integration (opens new window) for terminals like kitty. (schrieveslaach)
Note: this is a shortened list. For the full list, see the "Changelog" section below
# Breaking changes
^=
is nowstarts-with
- config is now an environment variable
- To update, move
let config = ...
tolet-env config = ...
- This change was done for performance reasons and gives considerable performance improvements in some use cases.
- To update, move
# Looking ahead
The db
command joins the dfr
command in a set of experiments we're working on to better understand how to integrate Nushell with a wider set of data sources. Coming up soon are "lazy dataframes". These, like the new db
command, will allow you to build up a query against a dataframe before you execute it. This allows for much more efficient processing of the request against the data source.
The Nushell design team is deep in discussions about how to make this more universal, allowing the Nushell language to build up queries lazily against a data source, and allowing the data source to perform the optimal native query. There's more research to do here, but we're looking forward to being able to take what we've learned and grow the Nushell language. In the end, we hope, you won't need separate command sets for each data source type. Instead, you'll be able to connect and build your query all in the base Nushell language.
# Changelog
# Nushell
- sholderbach created Pin reedline to v0.5.0 for the next release (opens new window), and Fix CI to run doctests again (opens new window), and Bump reedline (opens new window), and Set to reedline main branch for development cycle (opens new window)
- elferherrera created added open editor event in config parsing (opens new window), and Database commands (opens new window), and Line buffer keybinding (opens new window), and Line buffer editor (opens new window), and Database commands (opens new window), and Database commands (opens new window)
- zhiburt created Fix coloring when string has spaces (opens new window)
- jt created Update path completions to handle spaces (opens new window), and Rename =^ to 'starts-with' (opens new window), and More escaping/unescaping fixes (opens new window), and Adds error printing back in a couple places (opens new window), and Add unescaping to external command parsing (opens new window), and Move uses of trim_quotes to unescape for filenames (opens new window), and Make if else more lazy (opens new window), and Fix 'range' range exclusive (opens new window), and Allow bare words to interpolate (opens new window), and Warn if we see let config = .. (opens new window), and Fix cd - (opens new window), and Add 'and' and 'or' operators (opens new window), and Use better quoting for commandline args (opens new window), and Some cleanups for clippy (opens new window), and move config back to config.nu (opens new window), and Move config to be an env var (opens new window)
- Tropid created Fix erroneous removal of "./" folder prefix (opens new window), and Update reedline to use partial completion changes (opens new window), and Remove "./" prefix for file path completions (opens new window), and Fuzzy completion matching (opens new window), and Add MatchAlgorithm for completion suggestions (opens new window), and Feature/refactor completion options (opens new window)
- stormasm created remove ctrl-l from config.nu as a way to clear scrollback (opens new window), and event ClearScrollback is working in reedline / update config.nu (opens new window), and cleanup version command and add in database feature (opens new window), and mute false import warning for nu-command test where_ (opens new window), and add newlines to the end of the default config files (opens new window)
- gipsyh created Fixed ctrl-c in recursion loop bug #5362 (opens new window), and Fixed interrupting a for-loop over a list bug #5378 (opens new window), and Don't resuggest accepted completions (opens new window), and Fix use of
export/alias --help
bug (opens new window) - rgwood created CI: Add job to build plugins (opens new window), and Add Miette "fancy" feature to fix plugin builds (opens new window), and CI: build virtualenv tests in dev profile for speed (opens new window), and Error printing changes for
watch
(opens new window), and Faster CI (opens new window), and rust-cache fix (opens new window), and CI: remove rust-cache from virtualenv tests (opens new window), and CI: make Clippy reuse build artifacts, other cleanup (opens new window), and CI: enable rust-cache, remove minimal (opens new window), and Openssl feature (opens new window), and Statically link OpenSSL (opens new window), anddb info
tweaks (opens new window), and Add watch command (opens new window), and Move print_pipeline_data() to nu-protocol (opens new window), and Clean up tests and unused documentation code (opens new window), and Clean up unused files in repo root (opens new window), and Handle custom values indescribe
(opens new window), and SQLite overhaul: custom value,query db
command (opens new window) - panicbit created Add ends-with operator and fix dataframe operator behavior (opens new window)
- fdncred created a little database cleanup (opens new window), and allows for nushell to have tables without the index column (opens new window), and Revert "nu-cli/completions: better fix for files with special characters" (opens new window), and fixes an issue with an empty selector panic (opens new window), and
db info
command (opens new window), and add database feature to extra (opens new window), and update build status badge (opens new window), and update contrib to max=500 (opens new window), and update sys with new items, add kernel version to os-info (opens new window), and consolidate shell integration behind config setting (opens new window), and add virtualenv to integrations (opens new window), and update os-info os to name (opens new window), and add os to $nu based on rust's understanding (opens new window) - kubouch created Fix PATH update example (opens new window)
- herlon214 created nu-cli/completions: complete external args as filepath (opens new window), and nu-cli/completions: apply correctly nesting for env vars (opens new window), and nu-command/filesystem: remove newline from cd path (opens new window), and nu-cli/completions: add completion for $nu (opens new window), and nu-cli: directory syntax shape + completions (opens new window), and nu-cli/completions: support record for custom completion (opens new window), and nu-cli/completions: better fix for files with special characters (opens new window), and nu-cli/completions: fix file completions with quotes (opens new window), and nu-cli: added tests for file completions (opens new window)
- uasi created Fix quoting for command line args (opens new window), and Avoid using time conversion methods that may panic (opens new window)
- jmoore34 created Change description of
sort
(opens new window) - efx created improve inc plugin docs (opens new window)
- xgillard created activates optional trim in 'from csv' and 'from tsv' (opens new window)
- merelymyself created Allows cd (and other commands that depend on current working directory) to use path of type '~user' (opens new window), and Adding ~user tilde recognition in file paths (opens new window), and Added search terms to math commands (opens new window)
- jokeyrhyme created fix: remove
println!()
fromexec
builtin (opens new window) - babalolajnr created feat: add search terms to date (opens new window)
- raboof created typo: seach -> search (opens new window), and git completion: 'git fetch' for remotes (opens new window)
- jaeheonji created feat: add search terms to
conversions
(opens new window) - pinjeff created refactor html module (opens new window)
- Yethal created allow par-each to receive $in (opens new window)
- Sygmei created add custom_completion field to
$nu.scope.commands
command (opens new window) - zkat created update miette and switch to GenericErrors (opens new window), and documented ShellError errors. (opens new window)
- filaretov created Simplify known external tests (opens new window), and Add known external tests (opens new window), and Simplify known external name recovery (opens new window)
- homburg created
nth
->select
command (opens new window) - andrasio created Remove 'empty' block support reminders, for now. (opens new window)
- strega-nil created [ls, path relative-to] Fix use of
ls ~ | path relative-to ~
(opens new window), and don't join paths to cwd ever in calls to external functions (opens new window) - herlon214 created nu-cli/completions: completion for use and source (opens new window), and nu-cli/completions: removed unnecessary bool (opens new window), and Completion for variables of type Record (opens new window), and nu-cli/completions: add completion for $env. (opens new window)
- fdncred created add hex color parsing to ansi (opens new window), and updated cargo.lock with cargo update (opens new window), and tweak ci building badge (opens new window), and allow default color shortcut names (opens new window)
- stormasm created cleanup nu-command, remove redundant code (opens new window), and update crate chrono-tz to its latest version (opens new window)
- jt created Move to dev version 0.61.1 (opens new window)
- uasi created Fix env capture (opens new window)
- dantswain created Avoid duplicating post headers (opens new window)
- ZetaNumbers created fix: reduce command have not redirected block's evaluation output (opens new window)
- nibon7 created fix timestamp parsing on 32-bit platforms (opens new window)
- hustcer created Fix completions for
git push
andgit checkout
close: #5021 and #4599 (opens new window), and Add a dockerfile example based on debian bullseye-slim (opens new window) - tiffany352 created Add
char -i
for chars from integers (opens new window), and Allow passing an integer tochar -u
(opens new window) - rgwood created Initial SQLite functionality (opens new window)
- schrieveslaach created Shell Integration (opens new window)
# Documentation
- hustcer created Update zh-CN docs (opens new window), and feat: Add github action related stuff (opens new window), and More proofreading work for the zh-CN translations (opens new window), and Fix some broken links (opens new window), and Some proofreading work for zh-CN translations (opens new window), and Update zh-CN translations to the latest english version of commit: b6c91cabfa (opens new window), and Update some node modules (opens new window), and Translate dataframes.md to zh-CN from commit: 92fb0ac2c (opens new window), and Add basic config and pages for Turkish (opens new window), and Add translation guide (opens new window), and Translate line_editor.md to zh-CN from commit: e0688a346 (opens new window), and Update i18n.nu add
outdated
command to check outdated translations (opens new window), and Translate coloring_and_theming.md to zh-CN from commit: f3dc86d3d (opens new window), and Translate some small docs to zh-CN from commit: f5987a82d (opens new window), and Fix some typo and Translate configuration & environment to zh-CN from commit: f5987a82d (opens new window), and Translate lots of small docs to zh-CN from commit: ae23eeba3 (opens new window) - reillysiemens created Fix broken nu_scripts repo link (opens new window)
- merelymyself created Changed the confusing title of "Working With Strings" (opens new window)
- Yethal created Update working_with_tables.md (opens new window)
- morzel85 created Update loading_data.md (opens new window)
- stormasm created update section on aliases for adding pipes and persisting (opens new window)
- raboof created fix typo required->require (opens new window)
- rgwood created Document PATH configuration (opens new window)
- Sygmei created Fix "Concatenate tables" section from "Table docs" (opens new window)
- Cyborus04 created Fix command-less
cd
example (opens new window) - Szune created Typo fix in 2022-04-12-nushell_0_61.md (opens new window)
- fennewald created Update coming_from_bash.md (opens new window)
# Nu scripts
- fdncred created update get_os_icon for wsl (opens new window), and update type-o for windows (opens new window), and use $nu.os-info vs (sys).host for speed (opens new window)
- raboof created custom completions: git: 'git fetch' (opens new window)
- Yethal created Update nuschiit.nu (opens new window), and Add webscraping and gitlab scanning scripts (opens new window)
- kubouch created Change conda activation scripts to be a module (opens new window)
- hustcer created Fix completions for
git push
andgit checkout
(opens new window) - ZetaNumbers created fix: make complitions referred to undefinded "nu-complete files" (opens new window)
# reedline
- sholderbach created Change keybinding for external editor (opens new window), and Prepare the 0.5.0 release (opens new window), and Fix README and lib.rs code examples (opens new window), and Add doctests back to the CI (opens new window), and Vi additions and fixes by @zim0369 (opens new window), and Attempt fix of
ClearScrollback
(opens new window), and Fix the CI badge (opens new window), and Change the CI to use caching (opens new window), and Add better options for screen clearing (opens new window), and Add explicitEditCommand::InsertNewline
(opens new window) - elferherrera created Buffer editor keybinding (opens new window), and line buffer editor (opens new window)
- Tropid created Only partial complete suggestions when input is a prefix (opens new window)
- gipsyh created Append whitespace after selecting menu (opens new window)
- zim0369 created Add vim's
C
binding (opens new window), and Implements vim's prepend to start binding (opens new window)