Nushell 0.90.1
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.90.1 of Nu. This release adds new completion menu improvements, unifies how globbing works across commands, and improves many existing commands.
Where to get it
Nu 0.90.1 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.90.1
- Where to get it
- Table of content
- Themes of this release / New features [toc]
- Breaking changes [toc]
- Full changelog [toc]
Themes of this release / New features [toc]
New Reedline coolness
We have some exciting new improvements in our line editor, thanks to unprecedented number of contributions since the last release.
First, the matching prefix of a completion is now highlighted (note that this doesn't work with fuzzy completions yet):
Second, completion menus now have more of an IDE feel to them (activated by Ctrl+N) #11593
Third, shift navigation (#11535) now allows selecting and pasting text by holding the Shift key:
All the new changes are configurable: See the changes to the default config file (if the link does not bring you to the default_config.nu
file, click the "Files changed" tab, then search for "default_config.nu" and open the diff) to see what has changed.
(Breaking Change!) Handling globs
From this release, we unified glob rules for the following commands: open
, rm
, cp
, umv
, mv
, du
, ls
(#11621).
The general rules is: If given parameter is quoted by single quote(') or double quote("), don't auto-expand the glob pattern (#11569). If not quoted (or using backtick quote`
), the glob pattern is auto-expanded.
So if you have the following files: aac.txt
, abc.txt
, a[ab]c.txt
, then:
ls a[ab]c.txt
matchesaac.txt
,abc.txt
rm "a[bc]c.txt"
removes a file nameda[bc]c.txt
ls
matchesC:\Program Files\a[ab]c.txt
aac.txt
,abc.txt
But if you save a file name in a variable, e.g: let f = "a[ab]c.txt"
, then ls $f
matches aac.txt
, abc.txt
. To escape the glob pattern to match a file named a[bc]c.txt
, str escape-glob
comes to play: ls ($f | str escape-glob)
.
The new str escape-glob
command (#11663) is useful when you want to prevent globs from expanding, for example when using a closure: ls | str escape-glob name | each {|row| ls $row.name }
, so you won't get error occasionally.
(Breaking Change!) For existing plugin
Nushell allows plugins to receive configuration from the nushell configuration #10955, the communication protocol between nushell and plugin have changed to achieve the behavior. So plugins need to update nu-plugin
dependency version and recompile it to make plugin works again.
Starting a new Language Reference
Recently, we started a new reference page for Nushell language and its features. For years, we have used the current book as both a reference point for Nushell's features and a tutorial. The result is that it is too verbose to be used as a quick reference page, and due to its exhaustiveness it is also hard to keep concise as a tutorial. The story-like writing style makes it also harder to keep up to date. Over time, we hope to offload content from the book to the reference page that should be less verbose and easier to update. At the same time, we aim to refactor the book into more of a tutorial style and make it more coherent. Practical recipes for solving common problems continue being collected in the cookbook.
Parse-time evaluation
String interpolation can be now performed at parse time #11562. This gives you another way to, for example, compose files for importing or sourcing, for example:
const name = "spam"
use ($nu.default-config-dir | path join $"($name).nu")
The ansi
commands now can also be evaluated at parse time: #11682
Integration of more uutils commands
Continuing our cooperation with uutils, we now have a new umv
command, implemented by uutils, which will replace our current mv
#10822.
Our old-cp
was also removed #11622 and now we rely solely on cp
from uutils
Dataframes: allow specifying schema (#11634)
The dfr into-df
command can now accept a schema. A new dfr schema
command can be used to view the schema:
> {a:1, b:{a:2}} | dfr into-df -s {a: u8, b: {a: i32}} | dfr schema
╭───┬─────────────╮
│ a │ u8 │
│ │ ╭───┬─────╮ │
│ b │ │ a │ i32 │ │
│ │ ╰───┴─────╯ │
╰───┴─────────────╯
New CLI flag: --no-history
(#11550)
If nushell is launched with the --no-history
CLI flag, then command history file will not be read from or written to. You can check whether history is enabled using $nu.history-enabled
. It will be false if --no-history
was provided and true otherwise.
Strict JSON parsing (#11592)
The from json
command now has a --strict
flag which will error on invalid JSON. For example, comments and trailing commas are not allowed in JSON, and so will trigger an error with the --strict
flag.
Our set of commands is evolving [toc]
As usual, new release rhyms with changes to commands!
New commands [toc]
Apart from commands already mentioned above, into cell-path
can now be used to create cell paths dynamically.
Breaking changes [toc]
- #11705
query web --query
should returnlist<list<string>>
like the scraper crate'sElementRef::text()
- #11672 Fix precedence of 'not' operator
- #11331 hide
std testing
- #11541 Remove
--flag: bool
support - #11581 Plugin explicit flags
- #11030 Fix parsing of strings with special characters
- #10955 Allow plugins to receive configuration from the nushell configuration
Full changelog [toc]
author | title | pr |
---|---|---|
@kubouch | Bump to dev version 0.89.1 | #11513 |
@crides | path exists : Empty path shouldn't be marked as exists | #11515 |
@NotLebedev | Fix incorrect handling of boolean flags for builtin commands | #11492 |
@fdncred | bump to reedline latest main | #11520 |
@ysthakur | Make only_buffer_difference: true work | #11488 |
@schrieveslaach | Fix "Char index out of bounds" Error | #11526 |
@fdncred | update nushell to latest reedline main after pr revert | #11528 |
@WindSoilder | add type check during eval time | #11475 |
@NotLebedev | Add file attribute handling flag to cp | #11491 |
@fdncred | update query web param --as-table from Table to List | #11531 |
@abusch | Fix commandline --cursor-end | #11504 |
@SUPERCILEX | Show last command and running commands in title with shell_integration | #11532 |
@atahabaki | check existence w/o traversing symlinks | #10872 |
@NotLebedev | Support for disabling automatic escaping in to xml | #11536 |
@nibon7 | Apply nightly clippy fixes | #11508 |
@WindSoilder | adjust some commands input_output type | #11436 |
@drbrain | Allow plugins to receive configuration from the nushell configuration | #10955 |
@IanManske | Do not block signals for child processes | #11402 |
@dead10ck | Fix memory consumption of into sqlite | #10232 |
@flying-sheep | Fix deprecation in default_config.nu | #11547 |
@DonSheddow | Allow tables and records as input to math commands | #11496 |
@h7kanna | Fix tarpaulin skip attribute to latest | #11552 |
@IanManske | Add CLI flag to disable history | #11550 |
@abusch | fix: items doesn't support lazy records | #11567 |
@dmatos2012 | Initial implementation of umv from uutils | #10822 |
@michel-slm | Replace htmlescape with v_htmlescape | #11572 |
@WindSoilder | Send only absolute paths to uu_mv | #11576 |
@NotLebedev | Add self-closed tag support for to xml | #11577 |
@MarikaChlebowska | Fix parsing of strings with special characters | #11030 |
@fdncred | update deps calamine and quick-xml | #11582 |
@Tastaturtaste | Add shift + navigation functionality through reedline | #11535 |
@maxomatic458 | update reedline | #11589 |
@maxomatic458 | IDE style completion | #11593 |
@stormasm | update Cargo.lock with the latest reedline | #11594 |
@yukitomoda | Allow string to copmpare with another string | #11590 |
@fdncred | allow math avg to work with durations | #11598 |
@WindSoilder | do not attempt to glob expand if the file path is wrapped in quotes | #11569 |
@ysthakur | Upgrade byte-unit from 4.0 to 5.1 | #11584 |
@ysthakur | Evaluate string interpolation at parse time | #11562 |
@ysthakur | Fix regression in help menu introduced by #11488 | #11608 |
@nibon7 | Remove duplicate which 4.4.2 | #11613 |
@NotLebedev | Plugin explicit flags | #11581 |
@fdncred | remove cp-old | #11622 |
@crides | resolving external highlight should take current PATH into account | #11618 |
@nibon7 | Bump polars from 0.35 to 0.36 | #11624 |
@Hofer-Julian | Adapt tests for internationalization | #11628 |
@andrei-27 | Added --index flag to input list | #11580 |
@drbrain | Add into cell-path for dynamic cell-path creation | #11322 |
@stormasm | update nu-ansi-term to 0.50, lscolors to 0.17, and add the Style attribute to Suggestion | #11635 |
@WindSoilder | Remove --flag: bool support | #11541 |
@crides | properly convert env for buffer editor | #11636 |
@amtoine | hide std testing | #11331 |
@fdncred | cleanup hide testing PR | #11638 |
@rsteube | external completer: support style | #11442 |
@amtoine | fix spreading of arguments to externals in toolkit | #11640 |
@davehorner | fix panic caused by ls \\.\pipe | #10558 |
@WindSoilder | Unify glob behavior on open , rm , cp-old , mv , umv , cp and du commands | #11621 |
@WindSoilder | making empty list matches list<int> types | #11596 |
@fdncred | make the input_output_types match on each and par-each | #11645 |
@stormasm | update Reedline so we can begin testing the menu refactor | #11647 |
@amtoine | add $.extra_usage to modules | #11649 |
@WindSoilder | fix force rm: should suppress error if directory is not found | #11656 |
@stormasm | Bump Reedline for the Menu Refactor | #11658 |
@KAAtheWiseGit | Fix wrong error for raw streams in into record | #11668 |
@WindSoilder | add str escape-glob command | #11664 |
@maxomatic458 | add match-text style + config setting for ide menu | #11670 |
@davehorner | use constant instead of <0 for ls fix | #11642 |
@fdncred | update to latest reedline for the quick completions fix | #11673 |
@ayax79 | The ability to specify a schema when using dfr open and dfr into-df | #11634 |
@sophiajt | Fix precedence of 'not' operator | #11672 |
@ayax79 | "[11611] fixing dataframe column comparisons" | #11676 |
@ysthakur | Respect SyntaxShape when parsing spread operator | #11674 |
@Geox644 | Highlights find upgrade | #11509 |
@IanManske | Strict JSON parsing | #11592 |
@WindSoilder | fix exit_code handling when running a scripts with ctrlc | #11466 |
@IanManske | Refactor lines command | #11685 |
@fdncred | make the ansi command const | #11682 |
@fdncred | change update cells column param from Table to List | #11691 |
@nibon7 | Bump wayland | #11694 |
@fdncred | rollback polars 0.37.0 | #11695 |
@rtpg | Tidy up the REPL main loop | #11655 |
@richardwesthaver | Allow 'url join' to print username without password | #11697 |
@WindSoilder | cp: expand target path before checking | #11692 |
@hustcer | Disable riscv64 build target temporarily to make release and nightly-build work | #11700 |
@fdncred | update query web wiki example | #11709 |
@fdncred | update to latest reedline after column menu fix | #11715 |
@kik4444 | query web --query should return list<list<string>> like the scraper crate's ElementRef::text() | #11705 |
@kubouch | Tighten def body parsing | #11719 |
@kubouch | Fix panic in rotate ; Add safe record creation function | #11718 |
@fdncred | allow strings with thousands separators to be converted to filesize or ints | #11724 |