From c4b3499c0e289db716a5a318df1da6338e0902ec Mon Sep 17 00:00:00 2001 From: Ian Manske Date: Sun, 26 Jan 2025 12:23:58 -0800 Subject: [PATCH 01/13] Release notes for `0.102.0` Please add your new features and breaking changes to the release notes by opening PRs against the `release-notes-0.102.0` branch. ## TODO - [ ] look at interesting contributions - [ ] write all the sections - [ ] order the sections by interest - [ ] add the breaking changes - [ ] detail the breaking changes - [ ] add the full changelog - [ ] complete all the `TODO`s inside the release note - [ ] ... (PRs that need to land before the release, e.g. [deprecations](https://github.com/nushell/nushell/labels/deprecation) or [removals](https://github.com/nushell/nushell/pulls?q=is%3Apr+is%3Aopen+label%3Aremoval-after-deprecation)) --- blog/2025-02-04-nushell_0_102_0.md | 79 ++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 blog/2025-02-04-nushell_0_102_0.md diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md new file mode 100644 index 00000000000..e970e5ed5b8 --- /dev/null +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -0,0 +1,79 @@ +--- +title: Nushell 0.102.0 +author: The Nu Authors +author_site: https://twitter.com/nu_shell +author_image: https://www.nushell.sh/blog/images/nu_logo.png +excerpt: Today, we're releasing version 0.102.0 of Nu. This release adds... +--- + + + + + +# Nushell 0.102.0 + + + +Today, we're releasing version 0.102.0 of Nu. This release adds... + +# Where to get it + +Nu 0.102.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.102.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`. + +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_`. + +# Table of contents + + + +# Highlights and themes of this release + + + + +# Changes + +## Additions + +## Breaking changes + +## Deprecations + +## Removals + +## Bug fixes and other changes + +# Notes for plugin developers + +# Hall of fame + +Thanks to all the contributors below for helping us solve issues, improve documentation, refactor code, and more! :pray: + +| author | title | link | +| ------------------------------------ | ----- | ------------------------------------------------------- | +| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) | + +# Full changelog + + From ac6449003a69b10137b757174979100810d8c67e Mon Sep 17 00:00:00 2001 From: Yash Thakur <45539777+ysthakur@users.noreply.github.com> Date: Sun, 2 Feb 2025 16:18:27 -0500 Subject: [PATCH 02/13] ysthakur changes for 0.102 (#1760) * Note utouch replacing touch * Mention file completion fallback (#14781) * Note inheriting case_sensitive (#14738) --- blog/2025-02-04-nushell_0_102_0.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index e970e5ed5b8..9b345a2c413 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -46,12 +46,28 @@ As part of this release, we also publish a set of optional plugins you can insta ## Additions +### Custom completers fall back to file completions [[toc](#table-of-contents)] + +With [#14781](https://github.com/nushell/nushell/pull/14781), custom completers can return `null` to fall back to file completions. + ## Breaking changes +### External completers fall back to file completions only on `null` [[toc](#table-of-contents)] + +With [#14781](https://github.com/nushell/nushell/pull/14781), the external completer will fall back to file completions only if `null` is returned. The external completer used to do this for any invalid value, but completions will now be suppressed if a non-null invalid value is returned. + +### Custom completions inherit `case_sensitive` option from config [[toc](#table-of-contents)] + +With [#14738](https://github.com/nushell/nushell/pull/14738), when matching suggestions from a custom completions, the case sensitivity setting is always inherited from `$env.config.completions.case_sensitive`. Previously, if a custom completer returned a record containing an `options` field but didn't specify the `case_sensitive` option, it would default to `true`. + +This change doesn't apply to custom completers that return either lists or records without an `options` field. For such completers, `case_sensitive` was always inherited from `$env.config.completions.case_sensitive`. + ## Deprecations ## Removals +- `utouch` has been renamed to `touch` in [#14721](https://github.com/nushell/nushell/pull/14721). + ## Bug fixes and other changes # Notes for plugin developers From 853b049671e605a52ebc502a1570b85eddc7a2f4 Mon Sep 17 00:00:00 2001 From: Ian Manske Date: Mon, 3 Feb 2025 01:58:31 +0000 Subject: [PATCH 03/13] Start 0.102.0 release notes (#1776) * Add PR table * Categorize PRs * Add subsections * Fix typos * Add new PRs --- blog/2025-02-04-nushell_0_102_0.md | 284 +++++++++++++++++++++++++++-- 1 file changed, 270 insertions(+), 14 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index 9b345a2c413..f5709a3670b 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -46,12 +46,42 @@ As part of this release, we also publish a set of optional plugins you can insta ## Additions +| [@132ikl](https://github.com/132ikl) | Add flag to `debug profile` to output duration field as Value::Duration | [#14749](https://github.com/nushell/nushell/pull/14749) | +| [@Bahex](https://github.com/Bahex) | Add binary input support to `chunks` | [#14649](https://github.com/nushell/nushell/pull/14649) | +| [@Bahex](https://github.com/Bahex) | Add `bytes split` command | [#14652](https://github.com/nushell/nushell/pull/14652) | +| [@Bahex](https://github.com/Bahex) | Enable conditional `source` and `use` patterns by allowing `null` as a no-op module | [#14773](https://github.com/nushell/nushell/pull/14773) | +| [@Bahex](https://github.com/Bahex) | Add input support to `generate` | [#14804](https://github.com/nushell/nushell/pull/14804) | +| [@Bahex](https://github.com/Bahex) | Add new operators `has` and `not-has` | [#14841](https://github.com/nushell/nushell/pull/14841) | +| [@Coca162](https://github.com/Coca162) | Add `--first`/`--last` flags to `move` | [#14961](https://github.com/nushell/nushell/pull/14961) | +| [@Mudada](https://github.com/Mudada) | Add --no-highlight to find command | [#14970](https://github.com/nushell/nushell/pull/14970) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | "short" Welcome Banner option | [#14638](https://github.com/nushell/nushell/pull/14638) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Add user autoload directory | [#14669](https://github.com/nushell/nushell/pull/14669) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | `open`: Assign `content_type` metadata for filetypes not handled with a `from` converter | [#14670](https://github.com/nushell/nushell/pull/14670) | +| [@Tyarel8](https://github.com/Tyarel8) | `into datetime`: noop when input is a datetime | [#14845](https://github.com/nushell/nushell/pull/14845) | +| [@Tyarel8](https://github.com/Tyarel8) | `into cell-path`: noop when input is cell-path | [#14881](https://github.com/nushell/nushell/pull/14881) | +| [@Tyarel8](https://github.com/Tyarel8) | `into glob`: noop when input is glob | [#14882](https://github.com/nushell/nushell/pull/14882) | +| [@WindSoilder](https://github.com/WindSoilder) | Add help pipe-and-redirect command. | [#14821](https://github.com/nushell/nushell/pull/14821) | +| [@anomius](https://github.com/anomius) | non-HTTP(s) URLs now works with start | [#14370](https://github.com/nushell/nushell/pull/14370) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add `auto` option for `config.use_ansi_coloring` | [#14647](https://github.com/nushell/nushell/pull/14647) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add content type metadata to `config nu` commands | [#14666](https://github.com/nushell/nushell/pull/14666) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add command to get evaluated color setting | [#14683](https://github.com/nushell/nushell/pull/14683) | +| [@fdncred](https://github.com/fdncred) | add `version check` command | [#14880](https://github.com/nushell/nushell/pull/14880) | +| [@hjetmundsen](https://github.com/hjetmundsen) | Add glob support to utouch (issue #13623) | [#14674](https://github.com/nushell/nushell/pull/14674) | +| [@pyz4](https://github.com/pyz4) | `seq date`: generalize to allow any duration for `--increment` argument | [#14903](https://github.com/nushell/nushell/pull/14903) | + ### Custom completers fall back to file completions [[toc](#table-of-contents)] With [#14781](https://github.com/nushell/nushell/pull/14781), custom completers can return `null` to fall back to file completions. ## Breaking changes +| [@132ikl](https://github.com/132ikl) | Add run-time type checking for command pipeline input | [#14741](https://github.com/nushell/nushell/pull/14741) | +| [@132ikl](https://github.com/132ikl) | Don't expand ndots if prefixed with `./` | [#14755](https://github.com/nushell/nushell/pull/14755) | +| [@132ikl](https://github.com/132ikl) | Rename `fmt` to `format number` | [#14875](https://github.com/nushell/nushell/pull/14875) | +| [@Bahex](https://github.com/Bahex) | Run ENV_CONVERSIONS whenever it's modified | [#14591](https://github.com/nushell/nushell/pull/14591) | +| [@IanManske](https://github.com/IanManske) | Improve and fix filesize formatting/display | [#14397](https://github.com/nushell/nushell/pull/14397) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Rename `std/core` to `std/prelude` | [#14962](https://github.com/nushell/nushell/pull/14962) | + ### External completers fall back to file completions only on `null` [[toc](#table-of-contents)] With [#14781](https://github.com/nushell/nushell/pull/14781), the external completer will fall back to file completions only if `null` is returned. The external completer used to do this for any invalid value, but completions will now be suppressed if a non-null invalid value is returned. @@ -64,32 +94,258 @@ This change doesn't apply to custom completers that return either lists or recor ## Deprecations + + +| [@sholderbach](https://github.com/sholderbach) | Rename/deprecate `into bits` to `format bits` | [#14634](https://github.com/nushell/nushell/pull/14634) | +| [@sholderbach](https://github.com/sholderbach) | Rename/deprecate `range` to `slice` | [#14825](https://github.com/nushell/nushell/pull/14825) | + ## Removals - `utouch` has been renamed to `touch` in [#14721](https://github.com/nushell/nushell/pull/14721). + | [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Remove deprecated commands | [#14726](https://github.com/nushell/nushell/pull/14726) | ## Bug fixes and other changes +| [@132ikl](https://github.com/132ikl) | Make `get` const | [#14751](https://github.com/nushell/nushell/pull/14751) | +| [@132ikl](https://github.com/132ikl) | Fix config reset to use scaffold config files | [#14756](https://github.com/nushell/nushell/pull/14756) | +| [@132ikl](https://github.com/132ikl) | Remove required positional arguments from `run-external` and `exec` | [#14765](https://github.com/nushell/nushell/pull/14765) | +| [@Bahex](https://github.com/Bahex) | fix nuon conversions of range values | [#14687](https://github.com/nushell/nushell/pull/14687) | +| [@Bahex](https://github.com/Bahex) | small, backwards compatible enhancements to std | [#14763](https://github.com/nushell/nushell/pull/14763) | +| [@Bahex](https://github.com/Bahex) | fix error propagation in `export-env` | [#14847](https://github.com/nushell/nushell/pull/14847) | +| [@Bahex](https://github.com/Bahex) | fix range bugs in `str substring`, `str index-of`, `slice`, `bytes at` | [#14863](https://github.com/nushell/nushell/pull/14863) | +| [@Chen1Plus](https://github.com/Chen1Plus) | fix wrong error msg of `save` command on windows | [#14699](https://github.com/nushell/nushell/pull/14699) | +| [@ChetanXpro](https://github.com/ChetanXpro) | fix(explore): handle zero-size cursor in binary viewer | [#14592](https://github.com/nushell/nushell/pull/14592) | +| [@ChrisDenton](https://github.com/ChrisDenton) | Use non-canonicalized paths in shell integrations | [#14832](https://github.com/nushell/nushell/pull/14832) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Convert Path to `list` in main and preserve case | [#14764](https://github.com/nushell/nushell/pull/14764) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Fix improperly escaped strings in stor update | [#14921](https://github.com/nushell/nushell/pull/14921) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Fix: Directories using a tilde to represent HOME will now be converted to an absolute-path before running an external | [#14959](https://github.com/nushell/nushell/pull/14959) | +| [@WindSoilder](https://github.com/WindSoilder) | auto cd should not canonicalize symbolic path | [#14708](https://github.com/nushell/nushell/pull/14708) | +| [@dam4rus](https://github.com/dam4rus) | fix(explore): Fix esc immediately closing explore in expand and try view | [#14941](https://github.com/nushell/nushell/pull/14941) | +| [@dead10ck](https://github.com/dead10ck) | expand custom values on table display | [#14760](https://github.com/nushell/nushell/pull/14760) | +| [@devyn](https://github.com/devyn) | Change how `and` and `or` operations are compiled to IR to support custom values | [#14653](https://github.com/nushell/nushell/pull/14653) | +| [@fdncred](https://github.com/fdncred) | fix `stor reset` when there are foreign keys | [#14772](https://github.com/nushell/nushell/pull/14772) | +| [@fdncred](https://github.com/fdncred) | replace icons in grid with devicons + color | [#14827](https://github.com/nushell/nushell/pull/14827) | +| [@rikukiix](https://github.com/rikukiix) | make exec command decrement SHLVL correctly & SHLVL related test | [#14707](https://github.com/nushell/nushell/pull/14707) | +| [@sgvictorino](https://github.com/sgvictorino) | `cp`: disable unsupported reflink mode in freebsd builds | [#14677](https://github.com/nushell/nushell/pull/14677) | +| [@userwiths](https://github.com/userwiths) | Fix root directory traversal issue | [#14747](https://github.com/nushell/nushell/pull/14747) | +| [@zhiburt](https://github.com/zhiburt) | Try to fix tabled panic | [#14710](https://github.com/nushell/nushell/pull/14710) | + +### Parser fixes + +| [@WindSoilder](https://github.com/WindSoilder) | Fix variable names that end in a duration suffix can't be on the right part of a range | [#14848](https://github.com/nushell/nushell/pull/14848) | +| [@blindFS](https://github.com/blindFS) | fix: unknown span for special variables `$in/$it` | [#14789](https://github.com/nushell/nushell/pull/14789) | +| [@blindFS](https://github.com/blindFS) | fix(parser): span of `$it`/`$in` set to the first character of its scope | [#14817](https://github.com/nushell/nushell/pull/14817) | +| [@blindFS](https://github.com/blindFS) | fix(parser): missing span of the entire block of a module file | [#14889](https://github.com/nushell/nushell/pull/14889) | +| [@blindFS](https://github.com/blindFS) | fix(parser): mixed side effects of different choices in `parse_oneof` | [#14912](https://github.com/nushell/nushell/pull/14912) | +| [@blindFS](https://github.com/blindFS) | fix(parser): span of keyword expression | [#14928](https://github.com/nushell/nushell/pull/14928) | +| [@RobbingDaHood](https://github.com/RobbingDaHood) | 14523 all comments should be prefixed with space tab or be beginning of token | [#14616](https://github.com/nushell/nushell/pull/14616) | + +### Streaming improvements + +| [@WindSoilder](https://github.com/WindSoilder) | make du streaming | [#14665](https://github.com/nushell/nushell/pull/14665) | +| [@cosineblast](https://github.com/cosineblast) | add streaming to `get` and `reject` | [#14622](https://github.com/nushell/nushell/pull/14622) | +| [@simon-curtis](https://github.com/simon-curtis) | Implementing ByteStream interruption on infinite stream | [#13552](https://github.com/nushell/nushell/pull/13552) | + # Notes for plugin developers # Hall of fame Thanks to all the contributors below for helping us solve issues, improve documentation, refactor code, and more! :pray: -| author | title | link | -| ------------------------------------ | ----- | ------------------------------------------------------- | -| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) | +| author | title | link | +| ---------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) | +| [@0x4D5352](https://github.com/0x4D5352) | Improve example formatting in README.md | [#14695](https://github.com/nushell/nushell/pull/14695) | +| [@NiceGuyIT](https://github.com/NiceGuyIT) | Reference the correct command: insert -> delete | [#14696](https://github.com/nushell/nushell/pull/14696) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): use lsp-textdocument to handle utf16 position | [#14742](https://github.com/nushell/nushell/pull/14742) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): document_symbols and workspace_symbols | [#14770](https://github.com/nushell/nushell/pull/14770) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): inlay hints of variable types and command params | [#14802](https://github.com/nushell/nushell/pull/14802) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): PWD env_var | [#14805](https://github.com/nushell/nushell/pull/14805) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): inlay hints of types in assignments | [#14809](https://github.com/nushell/nushell/pull/14809) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): goto definition on variables in `match guard` | [#14818](https://github.com/nushell/nushell/pull/14818) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): workspace wide operations: `rename/goto references` | [#14837](https://github.com/nushell/nushell/pull/14837) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): cancellable heavy requests | [#14851](https://github.com/nushell/nushell/pull/14851) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): missing references in `use` command | [#14861](https://github.com/nushell/nushell/pull/14861) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): renaming of flag variables | [#14890](https://github.com/nushell/nushell/pull/14890) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): document highlight | [#14898](https://github.com/nushell/nushell/pull/14898) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): better completion item documentation | [#14905](https://github.com/nushell/nushell/pull/14905) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): goto/hover on module name in some commands | [#14924](https://github.com/nushell/nushell/pull/14924) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): show value on hover for const variables and CellPaths | [#14940](https://github.com/nushell/nushell/pull/14940) | +| [@blindFS](https://github.com/blindFS) | fix(completion): `DotNuCompletion` now completes nu scripts in const `$NU_LIB_DIRS` | [#14955](https://github.com/nushell/nushell/pull/14955) | +| [@blindFS](https://github.com/blindFS) | fix(completion): dotnu_completion for nested folders/scripts | [#14978](https://github.com/nushell/nushell/pull/14978) | +| [@blindFS](https://github.com/blindFS) | fix(completion): dotnu_completion dir with space, expand tilde | [#14983](https://github.com/nushell/nushell/pull/14983) | +| [@blindFS](https://github.com/blindFS) | fix: clippy warning of rust 1.8.4 | [#14984](https://github.com/nushell/nushell/pull/14984) | +| [@cosineblast](https://github.com/cosineblast) | `ls` now collects metadata in a separate thread | [#14627](https://github.com/nushell/nushell/pull/14627) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Replace `std::time::Instant` with `web_time::Instant` | [#14668](https://github.com/nushell/nushell/pull/14668) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Handle permission denied error at `nu_engine::glob_from` | [#14679](https://github.com/nushell/nushell/pull/14679) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Force installing nushell in standard lib tests to fix CI | [#14693](https://github.com/nushell/nushell/pull/14693) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Coerce boolean values into strings too | [#14704](https://github.com/nushell/nushell/pull/14704) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add `"whereis"` and `"get-command"` to `which` search terms | [#14797](https://github.com/nushell/nushell/pull/14797) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Refactor I/O Errors | [#14927](https://github.com/nushell/nushell/pull/14927) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Fix `cargo doc` Warnings | [#14948](https://github.com/nushell/nushell/pull/14948) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Replaced `IoError::new` calls that still had `Span::unknown()` | [#14968](https://github.com/nushell/nushell/pull/14968) | +| [@pyz4](https://github.com/pyz4) | nu_plugin_polars: add `polars into-repr` to display dataframe in portable repr format | [#14917](https://github.com/nushell/nushell/pull/14917) | +| [@tmillr](https://github.com/tmillr) | fix(cli): completion in nested blocks | [#14856](https://github.com/nushell/nushell/pull/14856) | +| [@tsukimizake](https://github.com/tsukimizake) | stop the prompt from removing the last newline | [#14590](https://github.com/nushell/nushell/pull/14590) | # Full changelog - +| author | title | link | +| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| [@0x4D5352](https://github.com/0x4D5352) | Improve example formatting in README.md | [#14695](https://github.com/nushell/nushell/pull/14695) | +| [@132ikl](https://github.com/132ikl) | Remove usages of internal_span | [#14700](https://github.com/nushell/nushell/pull/14700) | +| [@132ikl](https://github.com/132ikl) | Add run-time type checking for command pipeline input | [#14741](https://github.com/nushell/nushell/pull/14741) | +| [@132ikl](https://github.com/132ikl) | Add flag to `debug profile` to output duration field as Value::Duration | [#14749](https://github.com/nushell/nushell/pull/14749) | +| [@132ikl](https://github.com/132ikl) | Add doccomments to `find` functions in EngineState and StateWorkingSet | [#14750](https://github.com/nushell/nushell/pull/14750) | +| [@132ikl](https://github.com/132ikl) | Make `get` const | [#14751](https://github.com/nushell/nushell/pull/14751) | +| [@132ikl](https://github.com/132ikl) | Don't expand ndots if prefixed with `./` | [#14755](https://github.com/nushell/nushell/pull/14755) | +| [@132ikl](https://github.com/132ikl) | Fix config reset to use scaffold config files | [#14756](https://github.com/nushell/nushell/pull/14756) | +| [@132ikl](https://github.com/132ikl) | Change `PipelineData::into_value` to use internal `Value`'s span before passed in span | [#14757](https://github.com/nushell/nushell/pull/14757) | +| [@132ikl](https://github.com/132ikl) | Add newline to empty list output | [#14758](https://github.com/nushell/nushell/pull/14758) | +| [@132ikl](https://github.com/132ikl) | Remove required positional arguments from `run-external` and `exec` | [#14765](https://github.com/nushell/nushell/pull/14765) | +| [@132ikl](https://github.com/132ikl) | Fix extra newline on empty lists when $env.config.table.show_empty is… | [#14766](https://github.com/nushell/nushell/pull/14766) | +| [@132ikl](https://github.com/132ikl) | Remove file accidentally re-introduced by merge | [#14785](https://github.com/nushell/nushell/pull/14785) | +| [@132ikl](https://github.com/132ikl) | Immediately return error if detected as pipeline input or positional argument | [#14874](https://github.com/nushell/nushell/pull/14874) | +| [@132ikl](https://github.com/132ikl) | Rename `fmt` to `format number` | [#14875](https://github.com/nushell/nushell/pull/14875) | +| [@132ikl](https://github.com/132ikl) | Run-time pipeline input typechecking tweaks | [#14922](https://github.com/nushell/nushell/pull/14922) | +| [@Bahex](https://github.com/Bahex) | Run ENV_CONVERSIONS whenever it's modified | [#14591](https://github.com/nushell/nushell/pull/14591) | +| [@Bahex](https://github.com/Bahex) | Add binary input support to `chunks` | [#14649](https://github.com/nushell/nushell/pull/14649) | +| [@Bahex](https://github.com/Bahex) | Add `bytes split` command | [#14652](https://github.com/nushell/nushell/pull/14652) | +| [@Bahex](https://github.com/Bahex) | fix nuon conversions of range values | [#14687](https://github.com/nushell/nushell/pull/14687) | +| [@Bahex](https://github.com/Bahex) | small, backwards compatible enhancements to std | [#14763](https://github.com/nushell/nushell/pull/14763) | +| [@Bahex](https://github.com/Bahex) | Enable conditional `source` and `use` patterns by allowing `null` as a no-op module | [#14773](https://github.com/nushell/nushell/pull/14773) | +| [@Bahex](https://github.com/Bahex) | Add input support to `generate` | [#14804](https://github.com/nushell/nushell/pull/14804) | +| [@Bahex](https://github.com/Bahex) | Add new operators `has` and `not-has` | [#14841](https://github.com/nushell/nushell/pull/14841) | +| [@Bahex](https://github.com/Bahex) | fix error propagation in `export-env` | [#14847](https://github.com/nushell/nushell/pull/14847) | +| [@Bahex](https://github.com/Bahex) | fix range bugs in `str substring`, `str index-of`, `slice`, `bytes at` | [#14863](https://github.com/nushell/nushell/pull/14863) | +| [@Bahex](https://github.com/Bahex) | fix(help operators): include `has` and `not-has` operators | [#14943](https://github.com/nushell/nushell/pull/14943) | +| [@Chen1Plus](https://github.com/Chen1Plus) | fix wrong error msg of `save` command on windows | [#14699](https://github.com/nushell/nushell/pull/14699) | +| [@ChetanXpro](https://github.com/ChetanXpro) | fix(explore): handle zero-size cursor in binary viewer | [#14592](https://github.com/nushell/nushell/pull/14592) | +| [@ChrisDenton](https://github.com/ChrisDenton) | Use non-canonicalized paths in shell integrations | [#14832](https://github.com/nushell/nushell/pull/14832) | +| [@Coca162](https://github.com/Coca162) | Add `--first`/`--last` flags to `move` | [#14961](https://github.com/nushell/nushell/pull/14961) | +| [@IanManske](https://github.com/IanManske) | Improve and fix filesize formatting/display | [#14397](https://github.com/nushell/nushell/pull/14397) | +| [@IanManske](https://github.com/IanManske) | Use `ref-cast` crate to remove some `unsafe` | [#14897](https://github.com/nushell/nushell/pull/14897) | +| [@IanManske](https://github.com/IanManske) | Remove unused types | [#14916](https://github.com/nushell/nushell/pull/14916) | +| [@Mudada](https://github.com/Mudada) | Add --no-highlight to find command | [#14970](https://github.com/nushell/nushell/pull/14970) | +| [@NiceGuyIT](https://github.com/NiceGuyIT) | Reference the correct command: insert -> delete | [#14696](https://github.com/nushell/nushell/pull/14696) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | "short" Welcome Banner option | [#14638](https://github.com/nushell/nushell/pull/14638) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Add user autoload directory | [#14669](https://github.com/nushell/nushell/pull/14669) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | `open`: Assign `content_type` metadata for filetypes not handled with a `from` converter | [#14670](https://github.com/nushell/nushell/pull/14670) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Remove no-longer-needed convert_env_values calls | [#14681](https://github.com/nushell/nushell/pull/14681) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Remove deprecated commands | [#14726](https://github.com/nushell/nushell/pull/14726) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Run SHLVL tests sequentially | [#14727](https://github.com/nushell/nushell/pull/14727) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Increment SHLVL before run_repl() | [#14732](https://github.com/nushell/nushell/pull/14732) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Add comment on `nu_repl` usage | [#14734](https://github.com/nushell/nushell/pull/14734) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Convert Path to `list` in main and preserve case | [#14764](https://github.com/nushell/nushell/pull/14764) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Fix retrieval of config directory for user autoloads | [#14877](https://github.com/nushell/nushell/pull/14877) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Use `$nu.data-dir` as last directory for vendor autoloads on all platforms | [#14879](https://github.com/nushell/nushell/pull/14879) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Improve example for epoch -> datetime | [#14886](https://github.com/nushell/nushell/pull/14886) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Add correct path from data-dir | [#14894](https://github.com/nushell/nushell/pull/14894) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Link to Blog in the welcome banner | [#14914](https://github.com/nushell/nushell/pull/14914) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Fix improperly escaped strings in stor update | [#14921](https://github.com/nushell/nushell/pull/14921) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Fix: Directories using a tilde to represent HOME will now be converted to an absolute-path before running an external | [#14959](https://github.com/nushell/nushell/pull/14959) | +| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Rename `std/core` to `std/prelude` | [#14962](https://github.com/nushell/nushell/pull/14962) | +| [@RobbingDaHood](https://github.com/RobbingDaHood) | 14523 all comments should be prefixed with space tab or be beginning of token | [#14616](https://github.com/nushell/nushell/pull/14616) | +| [@Tyarel8](https://github.com/Tyarel8) | `into datetime`: noop when input is a datetime | [#14845](https://github.com/nushell/nushell/pull/14845) | +| [@Tyarel8](https://github.com/Tyarel8) | `into cell-path`: noop when input is cell-path | [#14881](https://github.com/nushell/nushell/pull/14881) | +| [@Tyarel8](https://github.com/Tyarel8) | `into glob`: noop when input is glob | [#14882](https://github.com/nushell/nushell/pull/14882) | +| [@WindSoilder](https://github.com/WindSoilder) | make du streaming | [#14665](https://github.com/nushell/nushell/pull/14665) | +| [@WindSoilder](https://github.com/WindSoilder) | auto cd should not canonicalize symbolic path | [#14708](https://github.com/nushell/nushell/pull/14708) | +| [@WindSoilder](https://github.com/WindSoilder) | Add help pipe-and-redirect command. | [#14821](https://github.com/nushell/nushell/pull/14821) | +| [@WindSoilder](https://github.com/WindSoilder) | Fix variable names that end in a duration suffix can't be on the right part of a range | [#14848](https://github.com/nushell/nushell/pull/14848) | +| [@WindSoilder](https://github.com/WindSoilder) | add tests with display_error=True | [#14939](https://github.com/nushell/nushell/pull/14939) | +| [@anomius](https://github.com/anomius) | non-HTTP(s) URLs now works with start | [#14370](https://github.com/nushell/nushell/pull/14370) | +| [@app/dependabot](https://github.com/app/dependabot) | Bump git2 from 0.19.0 to 0.20.0 | [#14776](https://github.com/nushell/nushell/pull/14776) | +| [@app/dependabot](https://github.com/app/dependabot) | Bump tempfile from 3.14.0 to 3.15.0 | [#14777](https://github.com/nushell/nushell/pull/14777) | +| [@app/dependabot](https://github.com/app/dependabot) | Bump tokio from 1.42.0 to 1.43.0 | [#14829](https://github.com/nushell/nushell/pull/14829) | +| [@app/dependabot](https://github.com/app/dependabot) | Bump uuid from 1.11.0 to 1.12.0 | [#14830](https://github.com/nushell/nushell/pull/14830) | +| [@app/dependabot](https://github.com/app/dependabot) | Bump data-encoding from 2.6.0 to 2.7.0 | [#14831](https://github.com/nushell/nushell/pull/14831) | +| [@app/dependabot](https://github.com/app/dependabot) | Bump similar from 2.6.0 to 2.7.0 | [#14888](https://github.com/nushell/nushell/pull/14888) | +| [@app/dependabot](https://github.com/app/dependabot) | Bump brotli from 6.0.0 to 7.0.0 | [#14949](https://github.com/nushell/nushell/pull/14949) | +| [@app/dependabot](https://github.com/app/dependabot) | Bump shadow-rs from 0.37.0 to 0.38.0 | [#14952](https://github.com/nushell/nushell/pull/14952) | +| [@ayax79](https://github.com/ayax79) | Polars AWS S3 support | [#14648](https://github.com/nushell/nushell/pull/14648) | +| [@ayax79](https://github.com/ayax79) | Provide the ability to split strings in columns via `polars str-split` | [#14723](https://github.com/nushell/nushell/pull/14723) | +| [@ayax79](https://github.com/ayax79) | Polars upgrade to 0.46 | [#14933](https://github.com/nushell/nushell/pull/14933) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): use lsp-textdocument to handle utf16 position | [#14742](https://github.com/nushell/nushell/pull/14742) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): document_symbols and workspace_symbols | [#14770](https://github.com/nushell/nushell/pull/14770) | +| [@blindFS](https://github.com/blindFS) | fix: unknown span for special variables `$in/$it` | [#14789](https://github.com/nushell/nushell/pull/14789) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): inlay hints of variable types and command params | [#14802](https://github.com/nushell/nushell/pull/14802) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): PWD env_var | [#14805](https://github.com/nushell/nushell/pull/14805) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): inlay hints of types in assignments | [#14809](https://github.com/nushell/nushell/pull/14809) | +| [@blindFS](https://github.com/blindFS) | fix(parser): span of `$it`/`$in` set to the first character of its scope | [#14817](https://github.com/nushell/nushell/pull/14817) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): goto definition on variables in `match guard` | [#14818](https://github.com/nushell/nushell/pull/14818) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): workspace wide operations: `rename/goto references` | [#14837](https://github.com/nushell/nushell/pull/14837) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): cancellable heavy requests | [#14851](https://github.com/nushell/nushell/pull/14851) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): missing references in `use` command | [#14861](https://github.com/nushell/nushell/pull/14861) | +| [@blindFS](https://github.com/blindFS) | fix(parser): missing span of the entire block of a module file | [#14889](https://github.com/nushell/nushell/pull/14889) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): renaming of flag variables | [#14890](https://github.com/nushell/nushell/pull/14890) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): document highlight | [#14898](https://github.com/nushell/nushell/pull/14898) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): better completion item documentation | [#14905](https://github.com/nushell/nushell/pull/14905) | +| [@blindFS](https://github.com/blindFS) | fix(parser): mixed side effects of different choices in `parse_oneof` | [#14912](https://github.com/nushell/nushell/pull/14912) | +| [@blindFS](https://github.com/blindFS) | refactor(parser): use var_id for most constants in `ResolvedImportPattern` | [#14920](https://github.com/nushell/nushell/pull/14920) | +| [@blindFS](https://github.com/blindFS) | fix(lsp): goto/hover on module name in some commands | [#14924](https://github.com/nushell/nushell/pull/14924) | +| [@blindFS](https://github.com/blindFS) | fix(parser): span of keyword expression | [#14928](https://github.com/nushell/nushell/pull/14928) | +| [@blindFS](https://github.com/blindFS) | feat(lsp): show value on hover for const variables and CellPaths | [#14940](https://github.com/nushell/nushell/pull/14940) | +| [@blindFS](https://github.com/blindFS) | fix(completion): `DotNuCompletion` now completes nu scripts in const `$NU_LIB_DIRS` | [#14955](https://github.com/nushell/nushell/pull/14955) | +| [@blindFS](https://github.com/blindFS) | Bump lsp-textdocument from 0.4.0 to 0.4.1 | [#14974](https://github.com/nushell/nushell/pull/14974) | +| [@blindFS](https://github.com/blindFS) | fix(completion): dotnu_completion for nested folders/scripts | [#14978](https://github.com/nushell/nushell/pull/14978) | +| [@blindFS](https://github.com/blindFS) | fix(completion): dotnu_completion dir with space, expand tilde | [#14983](https://github.com/nushell/nushell/pull/14983) | +| [@blindFS](https://github.com/blindFS) | fix: clippy warning of rust 1.8.4 | [#14984](https://github.com/nushell/nushell/pull/14984) | +| [@cosineblast](https://github.com/cosineblast) | add streaming to `get` and `reject` | [#14622](https://github.com/nushell/nushell/pull/14622) | +| [@cosineblast](https://github.com/cosineblast) | `ls` now collects metadata in a separate thread | [#14627](https://github.com/nushell/nushell/pull/14627) | +| [@cosineblast](https://github.com/cosineblast) | Fix reject regression | [#14931](https://github.com/nushell/nushell/pull/14931) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add `auto` option for `config.use_ansi_coloring` | [#14647](https://github.com/nushell/nushell/pull/14647) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add content type metadata to `config nu` commands | [#14666](https://github.com/nushell/nushell/pull/14666) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Replace `std::time::Instant` with `web_time::Instant` | [#14668](https://github.com/nushell/nushell/pull/14668) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Handle permission denied error at `nu_engine::glob_from` | [#14679](https://github.com/nushell/nushell/pull/14679) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add command to get evaluated color setting | [#14683](https://github.com/nushell/nushell/pull/14683) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Force installing nushell in standard lib tests to fix CI | [#14693](https://github.com/nushell/nushell/pull/14693) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Coerce boolean values into strings too | [#14704](https://github.com/nushell/nushell/pull/14704) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Use `Value::coerce_bool` in `into bool` | [#14731](https://github.com/nushell/nushell/pull/14731) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add `"whereis"` and `"get-command"` to `which` search terms | [#14797](https://github.com/nushell/nushell/pull/14797) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Let `table` only check for `use_ansi_coloring` config value | [#14798](https://github.com/nushell/nushell/pull/14798) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Refactor I/O Errors | [#14927](https://github.com/nushell/nushell/pull/14927) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Fix `cargo doc` Warnings | [#14948](https://github.com/nushell/nushell/pull/14948) | +| [@cptpiepmatz](https://github.com/cptpiepmatz) | Replaced `IoError::new` calls that still had `Span::unknown()` | [#14968](https://github.com/nushell/nushell/pull/14968) | +| [@dam4rus](https://github.com/dam4rus) | fix(explore): Fix esc immediately closing explore in expand and try view | [#14941](https://github.com/nushell/nushell/pull/14941) | +| [@dead10ck](https://github.com/dead10ck) | expand custom values on table display | [#14760](https://github.com/nushell/nushell/pull/14760) | +| [@devyn](https://github.com/devyn) | Change how `and` and `or` operations are compiled to IR to support custom values | [#14653](https://github.com/nushell/nushell/pull/14653) | +| [@fdncred](https://github.com/fdncred) | replace regex crate with fancy_regex | [#14646](https://github.com/nushell/nushell/pull/14646) | +| [@fdncred](https://github.com/fdncred) | update banner command to respect use_ansi_colors | [#14684](https://github.com/nushell/nushell/pull/14684) | +| [@fdncred](https://github.com/fdncred) | more closure serialization | [#14698](https://github.com/nushell/nushell/pull/14698) | +| [@fdncred](https://github.com/fdncred) | better error message for "sum", "product", and "sum_of_squares" | [#14711](https://github.com/nushell/nushell/pull/14711) | +| [@fdncred](https://github.com/fdncred) | fix `stor reset` when there are foreign keys | [#14772](https://github.com/nushell/nushell/pull/14772) | +| [@fdncred](https://github.com/fdncred) | bump to rust version 1.82 | [#14795](https://github.com/nushell/nushell/pull/14795) | +| [@fdncred](https://github.com/fdncred) | finish removing terminal_size dep | [#14819](https://github.com/nushell/nushell/pull/14819) | +| [@fdncred](https://github.com/fdncred) | replace icons in grid with devicons + color | [#14827](https://github.com/nushell/nushell/pull/14827) | +| [@fdncred](https://github.com/fdncred) | add `version check` command | [#14880](https://github.com/nushell/nushell/pull/14880) | +| [@fdncred](https://github.com/fdncred) | manually revert from serde_yml to serde_yaml | [#14987](https://github.com/nushell/nushell/pull/14987) | +| [@hjetmundsen](https://github.com/hjetmundsen) | Remove trailing slash from symlink completion (issue #13275) | [#14667](https://github.com/nushell/nushell/pull/14667) | +| [@hjetmundsen](https://github.com/hjetmundsen) | Add glob support to utouch (issue #13623) | [#14674](https://github.com/nushell/nushell/pull/14674) | +| [@hustcer](https://github.com/hustcer) | Fix docker image tests | [#14671](https://github.com/nushell/nushell/pull/14671) | +| [@hustcer](https://github.com/hustcer) | Do not trigger release WF on nightly tags | [#14803](https://github.com/nushell/nushell/pull/14803) | +| [@hustcer](https://github.com/hustcer) | Update Nu to 0.101.0 for workflow and ping ubuntu-latest to 22.04 for riscv64gc build | [#14835](https://github.com/nushell/nushell/pull/14835) | +| [@pyz4](https://github.com/pyz4) | `seq date`: generalize to allow any duration for `--increment` argument | [#14903](https://github.com/nushell/nushell/pull/14903) | +| [@pyz4](https://github.com/pyz4) | nu_plugin_polars: add `polars into-repr` to display dataframe in portable repr format | [#14917](https://github.com/nushell/nushell/pull/14917) | +| [@rikukiix](https://github.com/rikukiix) | Switch from serde_yaml to serde_yml | [#14630](https://github.com/nushell/nushell/pull/14630) | +| [@rikukiix](https://github.com/rikukiix) | make exec command decrement SHLVL correctly & SHLVL related test | [#14707](https://github.com/nushell/nushell/pull/14707) | +| [@sgvictorino](https://github.com/sgvictorino) | `cp`: disable unsupported reflink mode in freebsd builds | [#14677](https://github.com/nushell/nushell/pull/14677) | +| [@sgvictorino](https://github.com/sgvictorino) | update uutils crates to `0.0.29` | [#14867](https://github.com/nushell/nushell/pull/14867) | +| [@sholderbach](https://github.com/sholderbach) | Rename/deprecate `into bits` to `format bits` | [#14634](https://github.com/nushell/nushell/pull/14634) | +| [@sholderbach](https://github.com/sholderbach) | Bump version to `0.101.1` | [#14661](https://github.com/nushell/nushell/pull/14661) | +| [@sholderbach](https://github.com/sholderbach) | Promote note about `internal_span` to doccomment | [#14703](https://github.com/nushell/nushell/pull/14703) | +| [@sholderbach](https://github.com/sholderbach) | Bump typos workflow to `1.29.4` | [#14782](https://github.com/nushell/nushell/pull/14782) | +| [@sholderbach](https://github.com/sholderbach) | Rename/deprecate `range` to `slice` | [#14825](https://github.com/nushell/nushell/pull/14825) | +| [@simon-curtis](https://github.com/simon-curtis) | Implementing ByteStream interruption on infinite stream | [#13552](https://github.com/nushell/nushell/pull/13552) | +| [@tmillr](https://github.com/tmillr) | fix(cli): completion in nested blocks | [#14856](https://github.com/nushell/nushell/pull/14856) | +| [@tsukimizake](https://github.com/tsukimizake) | stop the prompt from removing the last newline | [#14590](https://github.com/nushell/nushell/pull/14590) | +| [@userwiths](https://github.com/userwiths) | Fix root directory traversal issue | [#14747](https://github.com/nushell/nushell/pull/14747) | +| [@ysthakur](https://github.com/ysthakur) | Create nu_glob::is_glob function | [#14717](https://github.com/nushell/nushell/pull/14717) | +| [@ysthakur](https://github.com/ysthakur) | Make utouch the new touch | [#14721](https://github.com/nushell/nushell/pull/14721) | +| [@ysthakur](https://github.com/ysthakur) | Custom completions: Inherit case_sensitive option from $env.config | [#14738](https://github.com/nushell/nushell/pull/14738) | +| [@ysthakur](https://github.com/ysthakur) | Fallback to file completer in custom/external completer | [#14781](https://github.com/nushell/nushell/pull/14781) | +| [@ysthakur](https://github.com/ysthakur) | Use nucleo instead of skim for completions | [#14846](https://github.com/nushell/nushell/pull/14846) | +| [@ysthakur](https://github.com/ysthakur) | Use single atom for fuzzy matching (fix #14904) | [#14913](https://github.com/nushell/nushell/pull/14913) | +| [@zhiburt](https://github.com/zhiburt) | Bump tabled to 0.17 | [#14415](https://github.com/nushell/nushell/pull/14415) | +| [@zhiburt](https://github.com/zhiburt) | Try to fix tabled panic | [#14710](https://github.com/nushell/nushell/pull/14710) | +| [@zhiburt](https://github.com/zhiburt) | Fix #14842 | [#14885](https://github.com/nushell/nushell/pull/14885) | From 19039dbd4f6bad1bd41b210760fc4a1d07db9c07 Mon Sep 17 00:00:00 2001 From: 132ikl <132@ikl.sh> Date: Sun, 2 Feb 2025 23:08:21 -0500 Subject: [PATCH 04/13] 132ikl changes for 0.102.0 --- blog/2025-02-04-nushell_0_102_0.md | 138 +++++++++++++++++++++++++++-- 1 file changed, 131 insertions(+), 7 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index f5709a3670b..105b805b3f2 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -42,11 +42,63 @@ As part of this release, we also publish a set of optional plugins you can insta for the list of available *containers* --> +## Run-time pipeline input typechecking [[toc](#table-of-contents)] + +::: warning Breaking change +See a full overview of the [breaking changes](#breaking-changes) +::: + +Previously, the type of a command's pipeline input was only checked against the input/output types of that command at parse-time. With [#14741](https://github.com/nushell/nushell/pull/14741), this check also now happens at run-time. While these kinds of errors can often be caught at parse-time, adding run-time checks ensures commands can't receive unexpected input values. + +Here's an example command, which should only accept integer pipeline input: + +```nushell +def cool-int-print []: int -> nothing { + print $"my cool int is ($in)" +} + +1 | cool-int-print +# => my cool int is 1 + +"evil string" | cool-int-print +# => Error: nu::parser::input_type_mismatch +# => +# => × Command does not support string input. +# => ╭─[entry #12:1:17] +# => 1 │ "evil string" | cool-int-print +# => · ───────┬────── +# => · ╰── command doesn't support string input +# => ╰──── +``` + +The parser sees a string, and rejects the invalid input. Before this release however, if the parser couldn't determine an input was invalid, it would happily pass along the invalid value. In this example, the output type of `from json` is `any`, so the parser doesn't know we're trying to pass a string to `cool-int-print`: + +```nushell +"evil string" | from json | cool-int-print +# => my cool int is evil string +``` + +After this release, Nushell will also enforce the allowed input types at run-time (notice the error starts with `nu::shell` rather than `nu::parse`): + +```nushell +"evil string" | from json | cool-int-print +# => Error: nu::shell::only_supports_this_input_type +# => +# => × Input type not supported. +# => ╭─[entry #18:1:17] +# => 1 │ "evil string" | from json | cool-int-print +# => · ────┬──── ───────┬────── +# => · │ ╰── only int input data is supported +# => · ╰── input type: string +# => ╰──── +``` + +Because of this change, you may notice some new errors in your scripts like the one above. We've already adjusted the input/output types of many commands to better match their actual behavior (see [Command pipeline input/output type changes](#command-pipeline-input-output-type-changes-toc)), but if you run into an unexpected input type checking error, don't hesitate to file an issue! + # Changes ## Additions -| [@132ikl](https://github.com/132ikl) | Add flag to `debug profile` to output duration field as Value::Duration | [#14749](https://github.com/nushell/nushell/pull/14749) | | [@Bahex](https://github.com/Bahex) | Add binary input support to `chunks` | [#14649](https://github.com/nushell/nushell/pull/14649) | | [@Bahex](https://github.com/Bahex) | Add `bytes split` command | [#14652](https://github.com/nushell/nushell/pull/14652) | | [@Bahex](https://github.com/Bahex) | Enable conditional `source` and `use` patterns by allowing `null` as a no-op module | [#14773](https://github.com/nushell/nushell/pull/14773) | @@ -73,11 +125,26 @@ As part of this release, we also publish a set of optional plugins you can insta With [#14781](https://github.com/nushell/nushell/pull/14781), custom completers can return `null` to fall back to file completions. +### `get` is now const [[toc](#table-of-contents)] + +With [#14751](https://github.com/nushell/nushell/pull/14751), the `get` command can now be used during [constant evaluation](/book/how_nushell_code_gets_run.md#parse-time-constant-evaluation). For example: + +```nushell +const foo = [1 2 3] | get 2 +$foo +# => 3 +``` + +### Duration value output from `debug profile` [[toc](#table-of-contents)] + +The `debug profile` command now has a `--duration-values` flag, which allows outputting the run time of an instruction with proper duration values rather than floats representing milliseconds. This allows for more fine-grained measurement, and lets you use commands which work on duration values [#14749](https://github.com/nushell/nushell/pull/14749). + +### `format number` (renamed from `fmt`) + +The `fmt` command, which is used for converting numbers to a variety of different formats, has been renamed to `format number` in [#14875](https://github.com/nushell/nushell/pull/14875). + ## Breaking changes -| [@132ikl](https://github.com/132ikl) | Add run-time type checking for command pipeline input | [#14741](https://github.com/nushell/nushell/pull/14741) | -| [@132ikl](https://github.com/132ikl) | Don't expand ndots if prefixed with `./` | [#14755](https://github.com/nushell/nushell/pull/14755) | -| [@132ikl](https://github.com/132ikl) | Rename `fmt` to `format number` | [#14875](https://github.com/nushell/nushell/pull/14875) | | [@Bahex](https://github.com/Bahex) | Run ENV_CONVERSIONS whenever it's modified | [#14591](https://github.com/nushell/nushell/pull/14591) | | [@IanManske](https://github.com/IanManske) | Improve and fix filesize formatting/display | [#14397](https://github.com/nushell/nushell/pull/14397) | | [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Rename `std/core` to `std/prelude` | [#14962](https://github.com/nushell/nushell/pull/14962) | @@ -92,6 +159,31 @@ With [#14738](https://github.com/nushell/nushell/pull/14738), when matching sugg This change doesn't apply to custom completers that return either lists or records without an `options` field. For such completers, `case_sensitive` was always inherited from `$env.config.completions.case_sensitive`. +### Command pipeline input/output type changes [[toc](#table-of-contents)] + +As part of the introduction of [run-time pipeline input type-checking](#run-time-pipeline-input-typechecking-toc) ([#14741](https://github.com/nushell/nushell/pull/14741), [#14922](https://github.com/nushell/nushell/pull/14922)), we discovered some inaccuracies in the listed input types for each command. The following commands had their input/output types adjusted to be more accurate: + +- `drop nth` +- `from csv` +- `from tsv` +- `get` +- `headers` +- `history import` +- `into string` +- `reject` +- `rotate` + +Additionally, the following commands have temporarily been given an input type of `any` to prevent undesirable errors. Unfortunately, this prevents input type checking at both parse-time and run-time for these commands, despite being possible previously. This doesn't affect many commands, and is intended as a workaround until a more robust solution can be implemented. For more details, see [#14922](https://github.com/nushell/nushell/pull/14922). + +- `load-env` +- `nu-check` +- `open` +- `polars when` +- `stor insert` +- `stor update` +- `format date` +- `into datetime` + ## Deprecations @@ -99,6 +191,10 @@ This change doesn't apply to custom completers that return either lists or recor | [@sholderbach](https://github.com/sholderbach) | Rename/deprecate `into bits` to `format bits` | [#14634](https://github.com/nushell/nushell/pull/14634) | | [@sholderbach](https://github.com/sholderbach) | Rename/deprecate `range` to `slice` | [#14825](https://github.com/nushell/nushell/pull/14825) | +### `fmt` [[toc](#table-of-contents)] + +The `fmt` command has been renamed to `format number`. Please change usages of the `fmt` command to `format number`, as `fmt` will be removed in a future release. ([#14875](https://github.com/nushell/nushell/pull/14875)) + ## Removals - `utouch` has been renamed to `touch` in [#14721](https://github.com/nushell/nushell/pull/14721). @@ -106,9 +202,6 @@ This change doesn't apply to custom completers that return either lists or recor ## Bug fixes and other changes -| [@132ikl](https://github.com/132ikl) | Make `get` const | [#14751](https://github.com/nushell/nushell/pull/14751) | -| [@132ikl](https://github.com/132ikl) | Fix config reset to use scaffold config files | [#14756](https://github.com/nushell/nushell/pull/14756) | -| [@132ikl](https://github.com/132ikl) | Remove required positional arguments from `run-external` and `exec` | [#14765](https://github.com/nushell/nushell/pull/14765) | | [@Bahex](https://github.com/Bahex) | fix nuon conversions of range values | [#14687](https://github.com/nushell/nushell/pull/14687) | | [@Bahex](https://github.com/Bahex) | small, backwards compatible enhancements to std | [#14763](https://github.com/nushell/nushell/pull/14763) | | [@Bahex](https://github.com/Bahex) | fix error propagation in `export-env` | [#14847](https://github.com/nushell/nushell/pull/14847) | @@ -130,6 +223,37 @@ This change doesn't apply to custom completers that return either lists or recor | [@userwiths](https://github.com/userwiths) | Fix root directory traversal issue | [#14747](https://github.com/nushell/nushell/pull/14747) | | [@zhiburt](https://github.com/zhiburt) | Try to fix tabled panic | [#14710](https://github.com/nushell/nushell/pull/14710) | + +#### Removed `run-external` and `exec` required positional argument [[toc](#table-of-contents)] + +With [#14765](https://github.com/nushell/nushell/pull/14765), lists can now be spread directly into `run-external` and `exec`: + +```nushell +let command = ["cat" "hello.txt"] +run-external ...$command +# => hello world! +``` + +#### Immediate error return [[toc](#table-of-contents)] + +With [#14874](https://github.com/nushell/nushell/pull/14874), if Nushell detects that an error value passed to a command as pipeline input or as an argument, it will immediately return that error rather than continuing execution. Nested errors (errors in lists, records, etc.) are unaffected. + +#### N-dots tweak [[toc](#table-of-contents)] + +With [#14755](https://github.com/nushell/nushell/pull/14755), [n-dots](/book/moving_around.md#changing-the-current-directory) such as `...` are no longer expanded when prefixed with `./` (ex. `...` is expanded, `./...` is no longer expanded). This should make the feature less surprising, while also providing better compatibility with external programs using `...` as part of their CLI. + +#### `config reset` fix [[toc](#table-of-contents)] + +With the config changes in the previous release, some of the internal files were moved around, causing `config reset` to use the "default" config (e.g., `config nu --default`) rather than the "scaffold" or empty config which gets created when you start Nushell for the first time. With [#14756](https://github.com/nushell/nushell/pull/14756), `config reset` now works as intended again. + +#### Fix empty list display when using `print` [[toc](#table-of-contents)] + +Previously, the `print` command would print the "empty list" placeholder text without a newline, causing messy looking output. This is fixed by [#14758](https://github.com/nushell/nushell/pull/14758), [#14766](https://github.com/nushell/nushell/pull/14766). + +#### Internal changes to `PipelineData` spans [[toc](#table-of-contents)] + +With [#14757](https://github.com/nushell/nushell/pull/14757), spans will now be maintained in some places where they were previously overridden by command calls. Some errors should now point to the actual source of a value, rather than pointing to the command which used it. + ### Parser fixes | [@WindSoilder](https://github.com/WindSoilder) | Fix variable names that end in a duration suffix can't be on the right part of a range | [#14848](https://github.com/nushell/nushell/pull/14848) | From 1dc2902b640b69b32541703fd06617cea41d9354 Mon Sep 17 00:00:00 2001 From: Bahex Date: Mon, 3 Feb 2025 15:41:06 +0300 Subject: [PATCH 05/13] Bahex changes for 0.102.0 (#1778) --- blog/2025-02-04-nushell_0_102_0.md | 103 ++++++++++++++++++++++++++--- 1 file changed, 94 insertions(+), 9 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index 105b805b3f2..ba7f9f57b6d 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -99,11 +99,6 @@ Because of this change, you may notice some new errors in your scripts like the ## Additions -| [@Bahex](https://github.com/Bahex) | Add binary input support to `chunks` | [#14649](https://github.com/nushell/nushell/pull/14649) | -| [@Bahex](https://github.com/Bahex) | Add `bytes split` command | [#14652](https://github.com/nushell/nushell/pull/14652) | -| [@Bahex](https://github.com/Bahex) | Enable conditional `source` and `use` patterns by allowing `null` as a no-op module | [#14773](https://github.com/nushell/nushell/pull/14773) | -| [@Bahex](https://github.com/Bahex) | Add input support to `generate` | [#14804](https://github.com/nushell/nushell/pull/14804) | -| [@Bahex](https://github.com/Bahex) | Add new operators `has` and `not-has` | [#14841](https://github.com/nushell/nushell/pull/14841) | | [@Coca162](https://github.com/Coca162) | Add `--first`/`--last` flags to `move` | [#14961](https://github.com/nushell/nushell/pull/14961) | | [@Mudada](https://github.com/Mudada) | Add --no-highlight to find command | [#14970](https://github.com/nushell/nushell/pull/14970) | | [@NotTheDr01ds](https://github.com/NotTheDr01ds) | "short" Welcome Banner option | [#14638](https://github.com/nushell/nushell/pull/14638) | @@ -143,12 +138,89 @@ The `debug profile` command now has a `--duration-values` flag, which allows out The `fmt` command, which is used for converting numbers to a variety of different formats, has been renamed to `format number` in [#14875](https://github.com/nushell/nushell/pull/14875). +### `chunks` supports binary input + +Thanks to [@Bahex](https://github.com/Bahex) in [#14649](https://github.com/nushell/nushell/pull/14649), `chunks` command now works on binary values and binary streams, making it easier to inspect and work on binary values and allowing partial reads from streams without collecting. + +For example, while working with a binary file or protocol, you might need to convert an IP address stored as raw bytes to the more commonly used string format. + +```nushell +0x[7F000001] | chunks 1 | each { into int } | str join "." +# => 127.0.0.1 +``` + +### `bytes split` + +In [#14652](https://github.com/nushell/nushell/pull/14652), [@Bahex](https://github.com/Bahex) added `bytes split`. +It is similar to `split row` and `lines`: + +- Like `split row`, it splits its input over an arbitrary delimiter. +- Like `lines`, it is streaming. + +Some programs can output text delimited by characters or sequences other than newlines ("\n"), commonly the NUL byte ("\0"), as the returned text may contain newlines. +If it is desirable to not collect the input or to act on a result as soon as possible `bytes split` can be used. + +For example, reading events from a socket or pipe: + +```nushell +open --raw ./events.sock | bytes split (char nul) | each { decode } +``` + +### `source null`/`use null` + +Thanks to [@Bahex](https://github.com/Bahex) in [#14773](https://github.com/nushell/nushell/pull/14773), `source` and `use` can be used with `null`, in which case the command is a noop. +This allows _conditionally sourcing files_, if the condition is decidable at parse time. + +```nushell +const file = path self local.nu +const file = if ($file | path exists) { $file } else { null } + +source $file +``` + +### `generate` with input + +In [#14804](https://github.com/nushell/nushell/pull/14804), [@Bahex](https://github.com/Bahex) added input support to `generate`. +Without pipeline input `generate` works same as before. + +With pipeline input, `generate`'s closure argument is supplied two arguments, + +- an item from the input +- the `next` value from the previous iteration + +This allows `generate` to act as a stateful `each` and more, filling the niche of a stateful _and_ streaming filter command. + +#### `std/iter scan` + +Thanks to the new capabilities of `generate`, `iter scan` was updated to be streaming. It is also considerably more performant with large inputs. + +### New operators: `has` and `not-has` + +In [#14841](https://github.com/nushell/nushell/pull/14841), [@Bahex](https://github.com/Bahex) added two new operators: `has` and `not-has`. +They are analogous to `in` and `not-in`, with the order of operands switched. + +This makes certain operations more ergonomic. + +```nushell +[[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where ("e" in $it.children) +# vs +[[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where children has "e" +``` + ## Breaking changes -| [@Bahex](https://github.com/Bahex) | Run ENV_CONVERSIONS whenever it's modified | [#14591](https://github.com/nushell/nushell/pull/14591) | | [@IanManske](https://github.com/IanManske) | Improve and fix filesize formatting/display | [#14397](https://github.com/nushell/nushell/pull/14397) | | [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Rename `std/core` to `std/prelude` | [#14962](https://github.com/nushell/nushell/pull/14962) | +### `ENV_CONVERSIONS` take effect immediately + +Thanks to [@Bahex](https://github.com/Bahex) in [#14591](https://github.com/nushell/nushell/pull/14591), when `$env.ENV_CONVERSIONS` is updated, changes take effect immediately. + +Previously, to make use of `ENV_CONVERSIONS` in your `config.nu`, you would need to set it up in `env.nu`, as it would only take effect after the file it was modified in was read. +Now, you can set it in `config.nu` and immediately make use of its results. + +This also makes it useful for use in scripts and other modules. + ### External completers fall back to file completions only on `null` [[toc](#table-of-contents)] With [#14781](https://github.com/nushell/nushell/pull/14781), the external completer will fall back to file completions only if `null` is returned. The external completer used to do this for any invalid value, but completions will now be suppressed if a non-null invalid value is returned. @@ -203,9 +275,7 @@ The `fmt` command has been renamed to `format number`. Please change usages of t ## Bug fixes and other changes | [@Bahex](https://github.com/Bahex) | fix nuon conversions of range values | [#14687](https://github.com/nushell/nushell/pull/14687) | -| [@Bahex](https://github.com/Bahex) | small, backwards compatible enhancements to std | [#14763](https://github.com/nushell/nushell/pull/14763) | | [@Bahex](https://github.com/Bahex) | fix error propagation in `export-env` | [#14847](https://github.com/nushell/nushell/pull/14847) | -| [@Bahex](https://github.com/Bahex) | fix range bugs in `str substring`, `str index-of`, `slice`, `bytes at` | [#14863](https://github.com/nushell/nushell/pull/14863) | | [@Chen1Plus](https://github.com/Chen1Plus) | fix wrong error msg of `save` command on windows | [#14699](https://github.com/nushell/nushell/pull/14699) | | [@ChetanXpro](https://github.com/ChetanXpro) | fix(explore): handle zero-size cursor in binary viewer | [#14592](https://github.com/nushell/nushell/pull/14592) | | [@ChrisDenton](https://github.com/ChrisDenton) | Use non-canonicalized paths in shell integrations | [#14832](https://github.com/nushell/nushell/pull/14832) | @@ -223,7 +293,6 @@ The `fmt` command has been renamed to `format number`. Please change usages of t | [@userwiths](https://github.com/userwiths) | Fix root directory traversal issue | [#14747](https://github.com/nushell/nushell/pull/14747) | | [@zhiburt](https://github.com/zhiburt) | Try to fix tabled panic | [#14710](https://github.com/nushell/nushell/pull/14710) | - #### Removed `run-external` and `exec` required positional argument [[toc](#table-of-contents)] With [#14765](https://github.com/nushell/nushell/pull/14765), lists can now be spread directly into `run-external` and `exec`: @@ -254,6 +323,22 @@ Previously, the `print` command would print the "empty list" placeholder text wi With [#14757](https://github.com/nushell/nushell/pull/14757), spans will now be maintained in some places where they were previously overridden by command calls. Some errors should now point to the actual source of a value, rather than pointing to the command which used it. +#### Range related bug fixes + +In [#14863](https://github.com/nushell/nushell/pull/14863), [@Bahex](https://github.com/Bahex) fixed range related bugs in + +- `str substring` +- `str index-of` +- `slice` +- `bytes at` + +#### `std` enhancements + +In [#14763](https://github.com/nushell/nushell/pull/14763), [@Bahex](https://github.com/Bahex) made small, backwards compatible enhancements to `std` + +- `iter find` and `iter find-index` work better with streams, only consuming the input up to the first matching item. +- Added `log set-level`, a small convenience command for changing the current logging level. + ### Parser fixes | [@WindSoilder](https://github.com/WindSoilder) | Fix variable names that end in a duration suffix can't be on the right part of a range | [#14848](https://github.com/nushell/nushell/pull/14848) | From 623b17b0f92da7f09f3c289241910ca826af9aa8 Mon Sep 17 00:00:00 2001 From: NotTheDr01ds <32344964+NotTheDr01ds@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:34:15 -0500 Subject: [PATCH 06/13] More additions expanded --- blog/2025-02-04-nushell_0_102_0.md | 97 ++++++++++++++++++++---------- 1 file changed, 65 insertions(+), 32 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index ba7f9f57b6d..ad320684adf 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -99,14 +99,6 @@ Because of this change, you may notice some new errors in your scripts like the ## Additions -| [@Coca162](https://github.com/Coca162) | Add `--first`/`--last` flags to `move` | [#14961](https://github.com/nushell/nushell/pull/14961) | -| [@Mudada](https://github.com/Mudada) | Add --no-highlight to find command | [#14970](https://github.com/nushell/nushell/pull/14970) | -| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | "short" Welcome Banner option | [#14638](https://github.com/nushell/nushell/pull/14638) | -| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Add user autoload directory | [#14669](https://github.com/nushell/nushell/pull/14669) | -| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | `open`: Assign `content_type` metadata for filetypes not handled with a `from` converter | [#14670](https://github.com/nushell/nushell/pull/14670) | -| [@Tyarel8](https://github.com/Tyarel8) | `into datetime`: noop when input is a datetime | [#14845](https://github.com/nushell/nushell/pull/14845) | -| [@Tyarel8](https://github.com/Tyarel8) | `into cell-path`: noop when input is cell-path | [#14881](https://github.com/nushell/nushell/pull/14881) | -| [@Tyarel8](https://github.com/Tyarel8) | `into glob`: noop when input is glob | [#14882](https://github.com/nushell/nushell/pull/14882) | | [@WindSoilder](https://github.com/WindSoilder) | Add help pipe-and-redirect command. | [#14821](https://github.com/nushell/nushell/pull/14821) | | [@anomius](https://github.com/anomius) | non-HTTP(s) URLs now works with start | [#14370](https://github.com/nushell/nushell/pull/14370) | | [@cptpiepmatz](https://github.com/cptpiepmatz) | Add `auto` option for `config.use_ansi_coloring` | [#14647](https://github.com/nushell/nushell/pull/14647) | @@ -116,6 +108,44 @@ Because of this change, you may notice some new errors in your scripts like the | [@hjetmundsen](https://github.com/hjetmundsen) | Add glob support to utouch (issue #13623) | [#14674](https://github.com/nushell/nushell/pull/14674) | | [@pyz4](https://github.com/pyz4) | `seq date`: generalize to allow any duration for `--increment` argument | [#14903](https://github.com/nushell/nushell/pull/14903) | +### `generate` with input + +In [#14804](https://github.com/nushell/nushell/pull/14804), [@Bahex](https://github.com/Bahex) added input support to `generate`. +Without pipeline input `generate` works same as before. + +With pipeline input, `generate`'s closure argument is supplied two arguments, + +- an item from the input +- the `next` value from the previous iteration + +This allows `generate` to act as a stateful `each` and more, filling the niche of a stateful _and_ streaming filter command. + +#### `std/iter scan` + +Thanks to the new capabilities of `generate`, `iter scan` was updated to be streaming. It is also considerably more performant with large inputs. + +### New operators: `has` and `not-has` + +In [#14841](https://github.com/nushell/nushell/pull/14841), [@Bahex](https://github.com/Bahex) added two new operators: `has` and `not-has`. +They are analogous to `in` and `not-in`, with the order of operands switched. + +This makes certain operations more ergonomic. + +```nushell +[[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where ("e" in $it.children) +# vs +[[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where children has "e" +``` + +### User autoload directories + +Previous Nushell releases added the `vendor/autoload` directories which were automatically sourced during startup. In +[#14669](https://github.com/nushell/nushell/pull/14669), [@NotTheDr01ds](https://github.com/NotTheDr01ds) extended this to +include user directories. + +During startup, any `.nu` files in `($nu.default-config-dir)/autoload` will be automatically sourced during startup. This occurs +after any vendor files have been processed, allowing user override of vendor settings if needed. + ### Custom completers fall back to file completions [[toc](#table-of-contents)] With [#14781](https://github.com/nushell/nushell/pull/14781), custom completers can return `null` to fall back to file completions. @@ -130,10 +160,6 @@ $foo # => 3 ``` -### Duration value output from `debug profile` [[toc](#table-of-contents)] - -The `debug profile` command now has a `--duration-values` flag, which allows outputting the run time of an instruction with proper duration values rather than floats representing milliseconds. This allows for more fine-grained measurement, and lets you use commands which work on duration values [#14749](https://github.com/nushell/nushell/pull/14749). - ### `format number` (renamed from `fmt`) The `fmt` command, which is used for converting numbers to a variety of different formats, has been renamed to `format number` in [#14875](https://github.com/nushell/nushell/pull/14875). @@ -166,6 +192,19 @@ For example, reading events from a socket or pipe: open --raw ./events.sock | bytes split (char nul) | each { decode } ``` +### Duration value output from `debug profile` [[toc](#table-of-contents)] + +The `debug profile` command now has a `--duration-values` flag, which allows outputting the run time of an instruction with proper duration values rather than floats representing milliseconds. This allows for more fine-grained measurement, and lets you use commands which work on duration values [#14749](https://github.com/nushell/nushell/pull/14749). + +### Several `into` commands can now operate on their own type + +Thanks to to | [@Tyarel8](https://github.com/Tyarel8) in [#14845](https://github.com/nushell/nushell/pull/14845), +[#14881](https://github.com/nushell/nushell/pull/14881), and +[#14882](https://github.com/nushell/nushell/pull/14882), +the `into datetime`, `into cell-path`, and `into glob` commands can now accept (respectively), a `datimetime`, `cell-path`, or `glob`. + +The commands will now return the values unaltered in these cases. + ### `source null`/`use null` Thanks to [@Bahex](https://github.com/Bahex) in [#14773](https://github.com/nushell/nushell/pull/14773), `source` and `use` can be used with `null`, in which case the command is a noop. @@ -178,34 +217,28 @@ const file = if ($file | path exists) { $file } else { null } source $file ``` -### `generate` with input +### New config option: `banner: 'short'` -In [#14804](https://github.com/nushell/nushell/pull/14804), [@Bahex](https://github.com/Bahex) added input support to `generate`. -Without pipeline input `generate` works same as before. +With [#14638](https://github.com/nushell/nushell/pull/14638), users can now configuration Nushell to start with a "short" welcome banner. -With pipeline input, `generate`'s closure argument is supplied two arguments, +The "short" banner will only show the startup time, allowing the user to populate the rest of the banner information as desired. -- an item from the input -- the `next` value from the previous iteration - -This allows `generate` to act as a stateful `each` and more, filling the niche of a stateful _and_ streaming filter command. +### `move --first`/`--list` flags -#### `std/iter scan` +[@Coca162](https://github.com/Coca162) added `--first`/`--last` flags to the `move` command in [#14961](https://github.com/nushell/nushell/pull/14961), +providing a convenient shorthand for moving a column to the first or last position in a table. -Thanks to the new capabilities of `generate`, `iter scan` was updated to be streaming. It is also considerably more performant with large inputs. +### `find --no-highlight` switch -### New operators: `has` and `not-has` +With [#14970](https://github.com/nushell/nushell/pull/14970), +[@Mudada](https://github.com/Mudada) added `--no-highlight` to the `find` command. This provides an easy way to remove ANSI formatting and +highlighting from non-regex `find`s and still keep the result as a table. -In [#14841](https://github.com/nushell/nushell/pull/14841), [@Bahex](https://github.com/Bahex) added two new operators: `has` and `not-has`. -They are analogous to `in` and `not-in`, with the order of operands switched. +### `content_type` metadata is now assigned to known filetypes that don't have a `from` convertor -This makes certain operations more ergonomic. - -```nushell -[[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where ("e" in $it.children) -# vs -[[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where children has "e" -``` +In ([#14670](https://github.com/nushell/nushell/pull/14670)), [@NotTheDr01ds](https://github.com/NotTheDr01ds) changed the `open` command to assign `content_type` metadata when a `from` convertor isn't +available for a known filetype. This primarily allows `open file.nu` to provide `application/x-nuscript` as the `content-type` even when +not using `open --raw`. ## Breaking changes From 98cca95d43f42d9314b32579719596beb64cc726 Mon Sep 17 00:00:00 2001 From: NotTheDr01ds <32344964+NotTheDr01ds@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:44:48 -0500 Subject: [PATCH 07/13] Continuing the 'Additions' section --- blog/2025-02-04-nushell_0_102_0.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index ad320684adf..a822a8bb976 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -99,15 +99,17 @@ Because of this change, you may notice some new errors in your scripts like the ## Additions -| [@WindSoilder](https://github.com/WindSoilder) | Add help pipe-and-redirect command. | [#14821](https://github.com/nushell/nushell/pull/14821) | -| [@anomius](https://github.com/anomius) | non-HTTP(s) URLs now works with start | [#14370](https://github.com/nushell/nushell/pull/14370) | | [@cptpiepmatz](https://github.com/cptpiepmatz) | Add `auto` option for `config.use_ansi_coloring` | [#14647](https://github.com/nushell/nushell/pull/14647) | | [@cptpiepmatz](https://github.com/cptpiepmatz) | Add content type metadata to `config nu` commands | [#14666](https://github.com/nushell/nushell/pull/14666) | | [@cptpiepmatz](https://github.com/cptpiepmatz) | Add command to get evaluated color setting | [#14683](https://github.com/nushell/nushell/pull/14683) | -| [@fdncred](https://github.com/fdncred) | add `version check` command | [#14880](https://github.com/nushell/nushell/pull/14880) | | [@hjetmundsen](https://github.com/hjetmundsen) | Add glob support to utouch (issue #13623) | [#14674](https://github.com/nushell/nushell/pull/14674) | | [@pyz4](https://github.com/pyz4) | `seq date`: generalize to allow any duration for `--increment` argument | [#14903](https://github.com/nushell/nushell/pull/14903) | +### New command: `version check` + +[@fdncred](https://github.com/fdncred) added a new `version check` command ([#14880](https://github.com/nushell/nushell/pull/14880)) +which can check your current Nushell version against the latest available release. + ### `generate` with input In [#14804](https://github.com/nushell/nushell/pull/14804), [@Bahex](https://github.com/Bahex) added input support to `generate`. @@ -192,6 +194,23 @@ For example, reading events from a socket or pipe: open --raw ./events.sock | bytes split (char nul) | each { decode } ``` +### New command: `help pipe-and-redirect` + +[@WindSoilder](https://github.com/WindSoilder) added `help pipe-and-redirect command` which lists the pipe and redirect operators. +([#14821](https://github.com/nushell/nushell/pull/14821) ) + +### The `start` command now works with non-HTTP URIs + +[@anomius](https://github.com/anomius) added support for additional URI types to the `start` command in ([#14370](https://github.com/nushell/nushell/pull/14370)). + +This means that, for example, if you have Spotify installed, the following will now start a Rickroll: + +```nu +start spotify:track:4PTG3Z6ehGkBFwjybzWkR8?si=f9b4cdfc1aa14831 +``` + +Of course, there are many more productive uses and URIs. + ### Duration value output from `debug profile` [[toc](#table-of-contents)] The `debug profile` command now has a `--duration-values` flag, which allows outputting the run time of an instruction with proper duration values rather than floats representing milliseconds. This allows for more fine-grained measurement, and lets you use commands which work on duration values [#14749](https://github.com/nushell/nushell/pull/14749). From aa434e2b8f1d8355d4ce64d1ae243bbd0afd5624 Mon Sep 17 00:00:00 2001 From: NotTheDr01ds <32344964+NotTheDr01ds@users.noreply.github.com> Date: Mon, 3 Feb 2025 17:47:38 -0500 Subject: [PATCH 08/13] Expansion of remaining Addition items --- blog/2025-02-04-nushell_0_102_0.md | 49 ++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index a822a8bb976..36eb843cd62 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -99,15 +99,9 @@ Because of this change, you may notice some new errors in your scripts like the ## Additions -| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add `auto` option for `config.use_ansi_coloring` | [#14647](https://github.com/nushell/nushell/pull/14647) | -| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add content type metadata to `config nu` commands | [#14666](https://github.com/nushell/nushell/pull/14666) | -| [@cptpiepmatz](https://github.com/cptpiepmatz) | Add command to get evaluated color setting | [#14683](https://github.com/nushell/nushell/pull/14683) | -| [@hjetmundsen](https://github.com/hjetmundsen) | Add glob support to utouch (issue #13623) | [#14674](https://github.com/nushell/nushell/pull/14674) | -| [@pyz4](https://github.com/pyz4) | `seq date`: generalize to allow any duration for `--increment` argument | [#14903](https://github.com/nushell/nushell/pull/14903) | - ### New command: `version check` -[@fdncred](https://github.com/fdncred) added a new `version check` command ([#14880](https://github.com/nushell/nushell/pull/14880)) +Thanks to [@fdncred](https://github.com/fdncred) for the new `version check` command ([#14880](https://github.com/nushell/nushell/pull/14880)) which can check your current Nushell version against the latest available release. ### `generate` with input @@ -196,12 +190,12 @@ open --raw ./events.sock | bytes split (char nul) | each { decode } ### New command: `help pipe-and-redirect` -[@WindSoilder](https://github.com/WindSoilder) added `help pipe-and-redirect command` which lists the pipe and redirect operators. -([#14821](https://github.com/nushell/nushell/pull/14821) ) +Thanks [@WindSoilder](https://github.com/WindSoilder) for the new `help pipe-and-redirect command` which lists the pipe and redirect operators. +([#14821](https://github.com/nushell/nushell/pull/14821)) ### The `start` command now works with non-HTTP URIs -[@anomius](https://github.com/anomius) added support for additional URI types to the `start` command in ([#14370](https://github.com/nushell/nushell/pull/14370)). +Thanks to [@anomius](https://github.com/anomius) for adding support for additional URI types to the `start` command in ([#14370](https://github.com/nushell/nushell/pull/14370)). This means that, for example, if you have Spotify installed, the following will now start a Rickroll: @@ -224,6 +218,10 @@ the `into datetime`, `into cell-path`, and `into glob` commands can now accept ( The commands will now return the values unaltered in these cases. +### `touch` now supports globbing + +Thanks to [@hjetmundsen](https://github.com/hjetmundsen), the `utouch` (now `touch`) command supports globbing ([#14674](https://github.com/nushell/nushell/pull/14674)). + ### `source null`/`use null` Thanks to [@Bahex](https://github.com/Bahex) in [#14773](https://github.com/nushell/nushell/pull/14773), `source` and `use` can be used with `null`, in which case the command is a noop. @@ -236,6 +234,18 @@ const file = if ($file | path exists) { $file } else { null } source $file ``` +### New config option: `use_ansi_coloring: 'auto'` + +[@cptpiepmatz](https://github.com/cptpiepmatz) `config.use_ansi_coloring: 'auto'` option in [#14647](https://github.com/nushell/nushell/pull/14647). +When set, Nushell will use ANSI coloring only when outputing to a terminal. This allows easier use of Nushell in embedded environments. + +When embedding Nushell in an environment that supports ANSI formatting, you can change the setting to `true`. + +#### Related new command: `config use-colors` + +The new `config use-colors` command will return the evaluated result of the `use_ansi_coloring` option. This allows scripts and custom commands to +determine whether to add or strip ANSI formatting from their output ([#14683](https://github.com/nushell/nushell/pull/14683)). + ### New config option: `banner: 'short'` With [#14638](https://github.com/nushell/nushell/pull/14638), users can now configuration Nushell to start with a "short" welcome banner. @@ -253,12 +263,23 @@ With [#14970](https://github.com/nushell/nushell/pull/14970), [@Mudada](https://github.com/Mudada) added `--no-highlight` to the `find` command. This provides an easy way to remove ANSI formatting and highlighting from non-regex `find`s and still keep the result as a table. +### `seq date` enhancements + +The `seq date` command can now use any duration for the `--increment` thanks to [@pyz4](https://github.com/pyz4)'s [#14903](https://github.com/nushell/nushell/pull/14903). + ### `content_type` metadata is now assigned to known filetypes that don't have a `from` convertor In ([#14670](https://github.com/nushell/nushell/pull/14670)), [@NotTheDr01ds](https://github.com/NotTheDr01ds) changed the `open` command to assign `content_type` metadata when a `from` convertor isn't available for a known filetype. This primarily allows `open file.nu` to provide `application/x-nuscript` as the `content-type` even when not using `open --raw`. +#### `content_type` set for `config nu` output + +Similarily in [#14666](https://github.com/nushell/nushell/pull/14666), [@cptpiepmatz](https://github.com/cptpiepmatz) updated the `config nu` command to add +`content_type` metadata. + +These two changes allow users to create a disable hook which will automatically `nu-highlight` the results. + ## Breaking changes | [@IanManske](https://github.com/IanManske) | Improve and fix filesize formatting/display | [#14397](https://github.com/nushell/nushell/pull/14397) | @@ -317,12 +338,14 @@ Additionally, the following commands have temporarily been given an input type o ### `fmt` [[toc](#table-of-contents)] -The `fmt` command has been renamed to `format number`. Please change usages of the `fmt` command to `format number`, as `fmt` will be removed in a future release. ([#14875](https://github.com/nushell/nushell/pull/14875)) +The `fmt` command has been renamed to `format number`. + +`fmt` command remains available in version 0.102 as a deprecated command; however, we recommend transitioning to `format number` for any existing uses, as `fmt` will be eliminated in an upcoming release. ([#14875](https://github.com/nushell/nushell/pull/14875)) ## Removals -- `utouch` has been renamed to `touch` in [#14721](https://github.com/nushell/nushell/pull/14721). - | [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Remove deprecated commands | [#14726](https://github.com/nushell/nushell/pull/14726) | +- `utouch` is now the `touch` command in [#14721](https://github.com/nushell/nushell/pull/14721). +- The `split-by`, `date to-record`, and `date to-table` commands where previously deprecate in 0.101 and have been removed in this release ([#14726](https://github.com/nushell/nushell/pull/14726)) ## Bug fixes and other changes From 78d82f0c49899a0588e467011aa89096414c283d Mon Sep 17 00:00:00 2001 From: NotTheDr01ds <32344964+NotTheDr01ds@users.noreply.github.com> Date: Mon, 3 Feb 2025 19:31:53 -0500 Subject: [PATCH 09/13] Fix typos and expand some fixes/changes --- blog/2025-02-04-nushell_0_102_0.md | 170 ++++++++++++++++++++--------- 1 file changed, 117 insertions(+), 53 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index 36eb843cd62..5a5115c7b5c 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -52,7 +52,7 @@ Previously, the type of a command's pipeline input was only checked against the Here's an example command, which should only accept integer pipeline input: -```nushell +```nu def cool-int-print []: int -> nothing { print $"my cool int is ($in)" } @@ -73,14 +73,14 @@ def cool-int-print []: int -> nothing { The parser sees a string, and rejects the invalid input. Before this release however, if the parser couldn't determine an input was invalid, it would happily pass along the invalid value. In this example, the output type of `from json` is `any`, so the parser doesn't know we're trying to pass a string to `cool-int-print`: -```nushell +```nu "evil string" | from json | cool-int-print # => my cool int is evil string ``` After this release, Nushell will also enforce the allowed input types at run-time (notice the error starts with `nu::shell` rather than `nu::parse`): -```nushell +```nu "evil string" | from json | cool-int-print # => Error: nu::shell::only_supports_this_input_type # => @@ -127,7 +127,7 @@ They are analogous to `in` and `not-in`, with the order of operands switched. This makes certain operations more ergonomic. -```nushell +```nu [[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where ("e" in $it.children) # vs [[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where children has "e" @@ -150,7 +150,7 @@ With [#14781](https://github.com/nushell/nushell/pull/14781), custom completers With [#14751](https://github.com/nushell/nushell/pull/14751), the `get` command can now be used during [constant evaluation](/book/how_nushell_code_gets_run.md#parse-time-constant-evaluation). For example: -```nushell +```nu const foo = [1 2 3] | get 2 $foo # => 3 @@ -166,7 +166,7 @@ Thanks to [@Bahex](https://github.com/Bahex) in [#14649](https://github.com/nush For example, while working with a binary file or protocol, you might need to convert an IP address stored as raw bytes to the more commonly used string format. -```nushell +```nu 0x[7F000001] | chunks 1 | each { into int } | str join "." # => 127.0.0.1 ``` @@ -184,7 +184,7 @@ If it is desirable to not collect the input or to act on a result as soon as pos For example, reading events from a socket or pipe: -```nushell +```nu open --raw ./events.sock | bytes split (char nul) | each { decode } ``` @@ -227,17 +227,27 @@ Thanks to [@hjetmundsen](https://github.com/hjetmundsen), the `utouch` (now `tou Thanks to [@Bahex](https://github.com/Bahex) in [#14773](https://github.com/nushell/nushell/pull/14773), `source` and `use` can be used with `null`, in which case the command is a noop. This allows _conditionally sourcing files_, if the condition is decidable at parse time. -```nushell +```nu const file = path self local.nu const file = if ($file | path exists) { $file } else { null } source $file ``` +### `run-external` and `exec` now support list spreading + +With [#14765](https://github.com/nushell/nushell/pull/14765), lists can now be spread directly into `run-external` and `exec`: + +```nu +let command = ["cat" "hello.txt"] +run-external ...$command +# => hello world! +``` + ### New config option: `use_ansi_coloring: 'auto'` [@cptpiepmatz](https://github.com/cptpiepmatz) `config.use_ansi_coloring: 'auto'` option in [#14647](https://github.com/nushell/nushell/pull/14647). -When set, Nushell will use ANSI coloring only when outputing to a terminal. This allows easier use of Nushell in embedded environments. +When set, Nushell will use ANSI coloring only when outputting to a terminal. This allows easier use of Nushell in embedded environments. When embedding Nushell in an environment that supports ANSI formatting, you can change the setting to `true`. @@ -275,7 +285,7 @@ not using `open --raw`. #### `content_type` set for `config nu` output -Similarily in [#14666](https://github.com/nushell/nushell/pull/14666), [@cptpiepmatz](https://github.com/cptpiepmatz) updated the `config nu` command to add +Similarly in [#14666](https://github.com/nushell/nushell/pull/14666), [@cptpiepmatz](https://github.com/cptpiepmatz) updated the `config nu` command to add `content_type` metadata. These two changes allow users to create a disable hook which will automatically `nu-highlight` the results. @@ -283,7 +293,6 @@ These two changes allow users to create a disable hook which will automatically ## Breaking changes | [@IanManske](https://github.com/IanManske) | Improve and fix filesize formatting/display | [#14397](https://github.com/nushell/nushell/pull/14397) | -| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Rename `std/core` to `std/prelude` | [#14962](https://github.com/nushell/nushell/pull/14962) | ### `ENV_CONVERSIONS` take effect immediately @@ -331,74 +340,54 @@ Additionally, the following commands have temporarily been given an input type o ## Deprecations - +The following commands have been deprecated in 0.102.0. They remain available, but will be removed in a future release. We recommend +updating existing code to use the replacement command. + +### `into bits` -| [@sholderbach](https://github.com/sholderbach) | Rename/deprecate `into bits` to `format bits` | [#14634](https://github.com/nushell/nushell/pull/14634) | -| [@sholderbach](https://github.com/sholderbach) | Rename/deprecate `range` to `slice` | [#14825](https://github.com/nushell/nushell/pull/14825) | +`into bits` is deprecated and replaced with the new `format bits` command with ([#14634](https://github.com/nushell/nushell/pull/14634). -### `fmt` [[toc](#table-of-contents)] +### `range` -The `fmt` command has been renamed to `format number`. +`range` is deprecated and replaced with the new `slice` command with [#14825](https://github.com/nushell/nushell/pull/14825). -`fmt` command remains available in version 0.102 as a deprecated command; however, we recommend transitioning to `format number` for any existing uses, as `fmt` will be eliminated in an upcoming release. ([#14875](https://github.com/nushell/nushell/pull/14875)) +### `fmt` + +`fmt` is deprecated and replaced with the new `format number` command with [#14875](https://github.com/nushell/nushell/pull/14875). ## Removals -- `utouch` is now the `touch` command in [#14721](https://github.com/nushell/nushell/pull/14721). -- The `split-by`, `date to-record`, and `date to-table` commands where previously deprecate in 0.101 and have been removed in this release ([#14726](https://github.com/nushell/nushell/pull/14726)) +### `utouch` -## Bug fixes and other changes +`utouch` is now the `touch` command in [#14721](https://github.com/nushell/nushell/pull/14721). -| [@Bahex](https://github.com/Bahex) | fix nuon conversions of range values | [#14687](https://github.com/nushell/nushell/pull/14687) | -| [@Bahex](https://github.com/Bahex) | fix error propagation in `export-env` | [#14847](https://github.com/nushell/nushell/pull/14847) | -| [@Chen1Plus](https://github.com/Chen1Plus) | fix wrong error msg of `save` command on windows | [#14699](https://github.com/nushell/nushell/pull/14699) | -| [@ChetanXpro](https://github.com/ChetanXpro) | fix(explore): handle zero-size cursor in binary viewer | [#14592](https://github.com/nushell/nushell/pull/14592) | -| [@ChrisDenton](https://github.com/ChrisDenton) | Use non-canonicalized paths in shell integrations | [#14832](https://github.com/nushell/nushell/pull/14832) | -| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Convert Path to `list` in main and preserve case | [#14764](https://github.com/nushell/nushell/pull/14764) | -| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Fix improperly escaped strings in stor update | [#14921](https://github.com/nushell/nushell/pull/14921) | -| [@NotTheDr01ds](https://github.com/NotTheDr01ds) | Fix: Directories using a tilde to represent HOME will now be converted to an absolute-path before running an external | [#14959](https://github.com/nushell/nushell/pull/14959) | -| [@WindSoilder](https://github.com/WindSoilder) | auto cd should not canonicalize symbolic path | [#14708](https://github.com/nushell/nushell/pull/14708) | -| [@dam4rus](https://github.com/dam4rus) | fix(explore): Fix esc immediately closing explore in expand and try view | [#14941](https://github.com/nushell/nushell/pull/14941) | -| [@dead10ck](https://github.com/dead10ck) | expand custom values on table display | [#14760](https://github.com/nushell/nushell/pull/14760) | -| [@devyn](https://github.com/devyn) | Change how `and` and `or` operations are compiled to IR to support custom values | [#14653](https://github.com/nushell/nushell/pull/14653) | -| [@fdncred](https://github.com/fdncred) | fix `stor reset` when there are foreign keys | [#14772](https://github.com/nushell/nushell/pull/14772) | -| [@fdncred](https://github.com/fdncred) | replace icons in grid with devicons + color | [#14827](https://github.com/nushell/nushell/pull/14827) | -| [@rikukiix](https://github.com/rikukiix) | make exec command decrement SHLVL correctly & SHLVL related test | [#14707](https://github.com/nushell/nushell/pull/14707) | -| [@sgvictorino](https://github.com/sgvictorino) | `cp`: disable unsupported reflink mode in freebsd builds | [#14677](https://github.com/nushell/nushell/pull/14677) | -| [@userwiths](https://github.com/userwiths) | Fix root directory traversal issue | [#14747](https://github.com/nushell/nushell/pull/14747) | -| [@zhiburt](https://github.com/zhiburt) | Try to fix tabled panic | [#14710](https://github.com/nushell/nushell/pull/14710) | - -#### Removed `run-external` and `exec` required positional argument [[toc](#table-of-contents)] +### Previously deprecated `split-by`, `date to-record`, and `date to-table` -With [#14765](https://github.com/nushell/nushell/pull/14765), lists can now be spread directly into `run-external` and `exec`: +The `split-by`, `date to-record`, and `date to-table` commands where previously deprecate in 0.101 and have been removed in this release ([#14726](https://github.com/nushell/nushell/pull/14726)) -```nushell -let command = ["cat" "hello.txt"] -run-external ...$command -# => hello world! -``` +## Bug fixes and other changes -#### Immediate error return [[toc](#table-of-contents)] +### Immediate error return [[toc](#table-of-contents)] With [#14874](https://github.com/nushell/nushell/pull/14874), if Nushell detects that an error value passed to a command as pipeline input or as an argument, it will immediately return that error rather than continuing execution. Nested errors (errors in lists, records, etc.) are unaffected. -#### N-dots tweak [[toc](#table-of-contents)] +### N-dots tweak [[toc](#table-of-contents)] With [#14755](https://github.com/nushell/nushell/pull/14755), [n-dots](/book/moving_around.md#changing-the-current-directory) such as `...` are no longer expanded when prefixed with `./` (ex. `...` is expanded, `./...` is no longer expanded). This should make the feature less surprising, while also providing better compatibility with external programs using `...` as part of their CLI. -#### `config reset` fix [[toc](#table-of-contents)] +### `config reset` fix [[toc](#table-of-contents)] With the config changes in the previous release, some of the internal files were moved around, causing `config reset` to use the "default" config (e.g., `config nu --default`) rather than the "scaffold" or empty config which gets created when you start Nushell for the first time. With [#14756](https://github.com/nushell/nushell/pull/14756), `config reset` now works as intended again. -#### Fix empty list display when using `print` [[toc](#table-of-contents)] +### Fix empty list display when using `print` [[toc](#table-of-contents)] Previously, the `print` command would print the "empty list" placeholder text without a newline, causing messy looking output. This is fixed by [#14758](https://github.com/nushell/nushell/pull/14758), [#14766](https://github.com/nushell/nushell/pull/14766). -#### Internal changes to `PipelineData` spans [[toc](#table-of-contents)] +### Internal changes to `PipelineData` spans [[toc](#table-of-contents)] With [#14757](https://github.com/nushell/nushell/pull/14757), spans will now be maintained in some places where they were previously overridden by command calls. Some errors should now point to the actual source of a value, rather than pointing to the command which used it. -#### Range related bug fixes +### Range related bug fixes In [#14863](https://github.com/nushell/nushell/pull/14863), [@Bahex](https://github.com/Bahex) fixed range related bugs in @@ -407,13 +396,88 @@ In [#14863](https://github.com/nushell/nushell/pull/14863), [@Bahex](https://git - `slice` - `bytes at` -#### `std` enhancements +### `std` enhancements In [#14763](https://github.com/nushell/nushell/pull/14763), [@Bahex](https://github.com/Bahex) made small, backwards compatible enhancements to `std` - `iter find` and `iter find-index` work better with streams, only consuming the input up to the first matching item. - Added `log set-level`, a small convenience command for changing the current logging level. +### Nuon conversions of range values now keep step size + +Previously, the step size of range values were discarded when converting `to nuon`. +With [#14687](https://github.com/nushell/nushell/pull/14687), the `to nuon` conversion of `range` values now include the step size. +As a result, `to nuon`/`from nuon` round trips now work for these values. Thanks [@Bahex](https://github.com/Bahex)! + +### `explore` command panic when viewing small binary files + +[#14592](https://github.com/nushell/nushell/pull/14592) fixes a panic in `explorer` when viewing small binary files +thanks to [@ChetanXpro](https://github.com/ChetanXpro). + +### Convert Path to `list` in main and preserve case + +With [#14764](https://github.com/nushell/nushell/pull/14764), the system `PATH` is now converted to a list +before the configuration files are processed. An explicit `ENV_CONVERSIONS` is no longer required for the `PATH`. + +It should be safe to remove any existing `ENV_CONVERSIONS` entry for `PATH`. + +The case of the `PATH` is also now preserved during this conversion. + +### Fix improperly escaped strings in `stor update` + +[@NotTheDr01ds](https://github.com/NotTheDr01ds) fixed an issue in `stor update` which prevented +single quotes from being stored properly ([#14921](https://github.com/nushell/nushell/pull/14921)). + +### auto cd should not canonicalize symbolic path + +[#14708](https://github.com/nushell/nushell/pull/14708) +thanks to [@WindSoilder](https://github.com/WindSoilder) + +### fix(explore): Fix esc immediately closing explore in expand and try view + +[#14941](https://github.com/nushell/nushell/pull/14941) +thanks to [@dam4rus](https://github.com/dam4rus) + +### expand custom values on table display + +[#14760](https://github.com/nushell/nushell/pull/14760) +thanks to [@dead10ck](https://github.com/dead10ck) + +### Change how `and` and `or` operations are compiled to IR to support custom values + +[#14653](https://github.com/nushell/nushell/pull/14653) +thanks to [@devyn](https://github.com/devyn) + +### fix `stor reset` when there are foreign keys + +[#14772](https://github.com/nushell/nushell/pull/14772) +thanks to [@fdncred](https://github.com/fdncred) + +### replace icons in grid with devicons + color + +[#14827](https://github.com/nushell/nushell/pull/14827) +thanks to [@fdncred](https://github.com/fdncred) + +### make exec command decrement SHLVL correctly & SHLVL related test + +[#14707](https://github.com/nushell/nushell/pull/14707) +thanks to [@rikukiix](https://github.com/rikukiix) + +### `cp`: disable unsupported reflink mode in freebsd builds + +[#14677](https://github.com/nushell/nushell/pull/14677) +thanks to [@sgvictorino](https://github.com/sgvictorino) + +### Fix root directory traversal issue + +[#14747](https://github.com/nushell/nushell/pull/14747) +thanks to [@userwiths](https://github.com/userwiths) + +### Try to fix tabled panic + +[#14710](https://github.com/nushell/nushell/pull/14710) +thanks to [@zhiburt](https://github.com/zhiburt) + ### Parser fixes | [@WindSoilder](https://github.com/WindSoilder) | Fix variable names that end in a duration suffix can't be on the right part of a range | [#14848](https://github.com/nushell/nushell/pull/14848) | From 88d8ac22f1fd0b6876562ecd9f2ddf2929966f85 Mon Sep 17 00:00:00 2001 From: NotTheDr01ds <32344964+NotTheDr01ds@users.noreply.github.com> Date: Mon, 3 Feb 2025 20:12:32 -0500 Subject: [PATCH 10/13] Expanded additional fixes/changes --- blog/2025-02-04-nushell_0_102_0.md | 58 +++++++++++++++--------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index 5a5115c7b5c..1562e026b72 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -428,55 +428,57 @@ The case of the `PATH` is also now preserved during this conversion. [@NotTheDr01ds](https://github.com/NotTheDr01ds) fixed an issue in `stor update` which prevented single quotes from being stored properly ([#14921](https://github.com/nushell/nushell/pull/14921)). -### auto cd should not canonicalize symbolic path +### Fix: Auto `cd` should not canonicalize symbolic path -[#14708](https://github.com/nushell/nushell/pull/14708) -thanks to [@WindSoilder](https://github.com/WindSoilder) +With [#14708](https://github.com/nushell/nushell/pull/14708), +[@WindSoilder](https://github.com/WindSoilder) fixes an issue where using `..` to go up one +directory from a symlink would result in the wrong PWD. -### fix(explore): Fix esc immediately closing explore in expand and try view +### Fix: Pressing Esc or Q was not closing `explore` -[#14941](https://github.com/nushell/nushell/pull/14941) -thanks to [@dam4rus](https://github.com/dam4rus) +Thanks to [@dam4rus](https://github.com/dam4rus), Esc and Q now properly close `explore` once again +([#14941](https://github.com/nushell/nushell/pull/14941)). -### expand custom values on table display +### Custom values are now expanded in tables -[#14760](https://github.com/nushell/nushell/pull/14760) -thanks to [@dead10ck](https://github.com/dead10ck) +Previously, custom values were being stringified in tables. +[#14760](https://github.com/nushell/nushell/pull/14760) expands these to display as Nushell values +thanks to [@dead10ck](https://github.com/dead10ck). ### Change how `and` and `or` operations are compiled to IR to support custom values -[#14653](https://github.com/nushell/nushell/pull/14653) -thanks to [@devyn](https://github.com/devyn) +[#14653](https://github.com/nushell/nushell/pull/14653) allows the `and` and `or` operators to support custom values once again +thanks to [@devyn](https://github.com/devyn). -### fix `stor reset` when there are foreign keys +### Fix `stor reset` when there are foreign keys -[#14772](https://github.com/nushell/nushell/pull/14772) -thanks to [@fdncred](https://github.com/fdncred) +Thanks to [@fdncred](https://github.com/fdncred) for fixing an issue where `stor reset` wasn't properly dropping tables +([#14772](https://github.com/nushell/nushell/pull/14772)). -### replace icons in grid with devicons + color +### New, improved grid icons -[#14827](https://github.com/nushell/nushell/pull/14827) -thanks to [@fdncred](https://github.com/fdncred) +`grid --icons` now uses the icons from the `devicons` crate after +[#14827](https://github.com/nushell/nushell/pull/14827). -### make exec command decrement SHLVL correctly & SHLVL related test +### SHLVL decrement on `exec` -[#14707](https://github.com/nushell/nushell/pull/14707) -thanks to [@rikukiix](https://github.com/rikukiix) +Thanks [@rikukiix](https://github.com/rikukiix) for fixing `exec` to properly decrement the `SHLVL` environment variable +([#14707](https://github.com/nushell/nushell/pull/14707)). -### `cp`: disable unsupported reflink mode in freebsd builds +### `cp`: Disable unsupported reflink mode in FreeBSD builds -[#14677](https://github.com/nushell/nushell/pull/14677) -thanks to [@sgvictorino](https://github.com/sgvictorino) +Thanks to [@sgvictorino](https://github.com/sgvictorino), `cp` no longer errors with "--reflink is only supported on +Linux and macOS" ([#14677](https://github.com/nushell/nushell/pull/14677)). ### Fix root directory traversal issue -[#14747](https://github.com/nushell/nushell/pull/14747) -thanks to [@userwiths](https://github.com/userwiths) +[@userwiths](https://github.com/userwiths) fixed an issue where `cd ..` at the root of a drive was returning the +incorrect directory ([#14747](https://github.com/nushell/nushell/pull/14747)). Thank you! -### Try to fix tabled panic +### Fix unexpanded table panic -[#14710](https://github.com/nushell/nushell/pull/14710) -thanks to [@zhiburt](https://github.com/zhiburt) +[#14710](https://github.com/nushell/nushell/pull/14710) fixes an issue where nested data was creating a panic when unexpanded +in a display hook. Thanks [@zhiburt](https://github.com/zhiburt)! ### Parser fixes From bcabc077278451b140dfa6659db2ecf438745a7f Mon Sep 17 00:00:00 2001 From: NotTheDr01ds <32344964+NotTheDr01ds@users.noreply.github.com> Date: Mon, 3 Feb 2025 20:41:02 -0500 Subject: [PATCH 11/13] Parser and streaming improvements --- blog/2025-02-04-nushell_0_102_0.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index 1562e026b72..9e453fe3464 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -482,18 +482,20 @@ in a display hook. Thanks [@zhiburt](https://github.com/zhiburt)! ### Parser fixes -| [@WindSoilder](https://github.com/WindSoilder) | Fix variable names that end in a duration suffix can't be on the right part of a range | [#14848](https://github.com/nushell/nushell/pull/14848) | -| [@blindFS](https://github.com/blindFS) | fix: unknown span for special variables `$in/$it` | [#14789](https://github.com/nushell/nushell/pull/14789) | -| [@blindFS](https://github.com/blindFS) | fix(parser): span of `$it`/`$in` set to the first character of its scope | [#14817](https://github.com/nushell/nushell/pull/14817) | -| [@blindFS](https://github.com/blindFS) | fix(parser): missing span of the entire block of a module file | [#14889](https://github.com/nushell/nushell/pull/14889) | -| [@blindFS](https://github.com/blindFS) | fix(parser): mixed side effects of different choices in `parse_oneof` | [#14912](https://github.com/nushell/nushell/pull/14912) | -| [@blindFS](https://github.com/blindFS) | fix(parser): span of keyword expression | [#14928](https://github.com/nushell/nushell/pull/14928) | -| [@RobbingDaHood](https://github.com/RobbingDaHood) | 14523 all comments should be prefixed with space tab or be beginning of token | [#14616](https://github.com/nushell/nushell/pull/14616) | +- Thanks [@WindSoilder](https://github.com/WindSoilder) for fixing an issue where a duration suffix in a variable name in a range confused the parser ([#14848](https://github.com/nushell/nushell/pull/14848)). +- Thanks [@blindFS](https://github.com/blindFS) for multiple parser fixes (and even more LSP fixes!): + - FixeS `$in`/`$it` having an unknown span ([#14789](https://github.com/nushell/nushell/pull/14789)) + - Fixed an issue where the span of `$it`/`$in` was set to the first character of its scope ([#14817](https://github.com/nushell/nushell/pull/14817)). + - Fixed a missing span of the entire block of a module file ([#14889](https://github.com/nushell/nushell/pull/14889)). + - Fixed an issue where the wrong span was highlighted when an `else` block had a parse error ([#14912](https://github.com/nushell/nushell/pull/14912)). + - Fixed the span of a keyword expression not including its subsidiary expression ([#14928](https://github.com/nushell/nushell/pull/14928)). +- [@RobbingDaHood](https://github.com/RobbingDaHood) fixed multiple issues with parsed comments not being prefixed with a space or tab, or being the beginning of a token ([#14616](https://github.com/nushell/nushell/pull/14616)). Thank you! ### Streaming improvements -| [@WindSoilder](https://github.com/WindSoilder) | make du streaming | [#14665](https://github.com/nushell/nushell/pull/14665) | -| [@cosineblast](https://github.com/cosineblast) | add streaming to `get` and `reject` | [#14622](https://github.com/nushell/nushell/pull/14622) | +- `du` now streams - Thanks [@WindSoilder](https://github.com/WindSoilder)! ([#14665](https://github.com/nushell/nushell/pull/14665)) +- `get` and `reject` now support streaming - Thanks [@cosineblast](https://github.com/cosineblast)! ([#14622](https://github.com/nushell/nushell/pull/14622)) + | [@simon-curtis](https://github.com/simon-curtis) | Implementing ByteStream interruption on infinite stream | [#13552](https://github.com/nushell/nushell/pull/13552) | # Notes for plugin developers @@ -504,7 +506,6 @@ Thanks to all the contributors below for helping us solve issues, improve docume | author | title | link | | ---------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------- | -| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) | | [@0x4D5352](https://github.com/0x4D5352) | Improve example formatting in README.md | [#14695](https://github.com/nushell/nushell/pull/14695) | | [@NiceGuyIT](https://github.com/NiceGuyIT) | Reference the correct command: insert -> delete | [#14696](https://github.com/nushell/nushell/pull/14696) | | [@blindFS](https://github.com/blindFS) | feat(lsp): use lsp-textdocument to handle utf16 position | [#14742](https://github.com/nushell/nushell/pull/14742) | From 8fd2e9734799cb723db58c32be1eda3bc4195b0e Mon Sep 17 00:00:00 2001 From: Ian Manske Date: Tue, 4 Feb 2025 05:22:39 +0000 Subject: [PATCH 12/13] Finish 0.102.0 release notes (#1781) * Cleanup * Formatting and other edits * Add file size formatting changes * Write excerpt * Generate TOC * Fix frontmatter * ndots change is breaking * Cleanup file size section --- blog/2025-02-04-nushell_0_102_0.md | 359 +++++++++++++++++------------ 1 file changed, 213 insertions(+), 146 deletions(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index 9e453fe3464..41421589a04 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -3,18 +3,13 @@ title: Nushell 0.102.0 author: The Nu Authors author_site: https://twitter.com/nu_shell author_image: https://www.nushell.sh/blog/images/nu_logo.png -excerpt: Today, we're releasing version 0.102.0 of Nu. This release adds... +excerpt: Today, we're releasing version 0.102.0 of Nu. This release adds runtime pipeline input type checking, several new commands and operators, and various other miscellaneous improvements. --- - - - - # Nushell 0.102.0 - - -Today, we're releasing version 0.102.0 of Nu. This release adds... +Today, we're releasing version 0.102.0 of Nu. This release adds runtime pipeline input type checking, +several new commands and operators, and various other miscellaneous improvements. # Where to get it @@ -24,23 +19,77 @@ As part of this release, we also publish a set of optional plugins you can insta # Table of contents - - -# Highlights and themes of this release - - - +- [_Highlights and themes of this release_](#highlights-and-themes-of-this-release-toc) + - [_Run-time pipeline input typechecking_](#run-time-pipeline-input-typechecking-toc) +- [_Changes_](#changes-toc) + - [_Additions_](#additions-toc) + - [_New command: `version check`_](#new-command-version-check-toc) + - [_`generate` with input_](#generate-with-input-toc) + - [_New operators: `has` and `not-has`_](#new-operators-has-and-not-has-toc) + - [_User autoload directories_](#user-autoload-directories-toc) + - [_Custom completers fall back to file completions_](#custom-completers-fall-back-to-file-completions-toc) + - [_`get` is now const_](#get-is-now-const-toc) + - [_`format number` (renamed from `fmt`)_](#format-number-renamed-from-fmt-toc) + - [_`chunks` supports binary input_](#chunks-supports-binary-input-toc) + - [_New command: `bytes split`_](#new-command-bytes-split-toc) + - [_New command: `help pipe-and-redirect`_](#new-command-help-pipe-and-redirect-toc) + - [_The `start` command now works with non-HTTP URIs_](#the-start-command-now-works-with-non-http-uris-toc) + - [_Duration value output from `debug profile`_](#duration-value-output-from-debug-profile-toc) + - [_Several `into` commands can now operate on their own type_](#several-into-commands-can-now-operate-on-their-own-type-toc) + - [_`touch` now supports globbing_](#touch-now-supports-globbing-toc) + - [_`source null`/`use null`_](#source-null-use-null-toc) + - [_`run-external` and `exec` now support list spreading_](#run-external-and-exec-now-support-list-spreading-toc) + - [_New config option: `use_ansi_coloring: 'auto'`_](#new-config-option-use-ansi-coloring-auto-toc) + - [_New config option: `banner: 'short'`_](#new-config-option-banner-short-toc) + - [_`move --first`/`--list` flags_](#move-first-list-flags-toc) + - [_`find --no-highlight` switch_](#find-no-highlight-switch-toc) + - [_`seq date` enhancements_](#seq-date-enhancements-toc) + - [_`content_type` metadata is now assigned to known filetypes that don't have a `from` convertor_](#content-type-metadata-is-now-assigned-to-known-filetypes-that-don-t-have-a-from-convertor-toc) + - [_Breaking changes_](#breaking-changes-toc) + - [_`$env.config.filesize` changes_](#env-config-filesize-changes-toc) + - [_`format filesize`_](#format-filesize-toc) + - [_`ENV_CONVERSIONS` take effect immediately_](#env-conversions-take-effect-immediately-toc) + - [_External completers fall back to file completions only on `null`_](#external-completers-fall-back-to-file-completions-only-on-null-toc) + - [_Custom completions inherit `case_sensitive` option from config_](#custom-completions-inherit-case-sensitive-option-from-config-toc) + - [_Command pipeline input/output type changes_](#command-pipeline-input-output-type-changes-toc) + - [_N-dots tweak_](#n-dots-tweak-toc) + - [_Deprecations_](#deprecations-toc) + - [_`into bits`_](#into-bits-toc) + - [_`range`_](#range-toc) + - [_`fmt`_](#fmt-toc) + - [_Removals_](#removals-toc) + - [_`utouch`_](#utouch-toc) + - [_`split-by`_](#split-by-toc) + - [_`date to-record`_](#date-to-record-toc) + - [_`date to-table`_](#date-to-table-toc) + - [_Bug fixes and other changes_](#bug-fixes-and-other-changes-toc) + - [_Immediate error return_](#immediate-error-return-toc) + - [_`config reset` fix_](#config-reset-fix-toc) + - [_Fix empty list display when using `print`_](#fix-empty-list-display-when-using-print-toc) + - [_Internal changes to `PipelineData` spans_](#internal-changes-to-pipelinedata-spans-toc) + - [_Range related bug fixes_](#range-related-bug-fixes-toc) + - [_`std` enhancements_](#std-enhancements-toc) + - [_Nuon conversions of range values now keep step size_](#nuon-conversions-of-range-values-now-keep-step-size-toc) + - [_`explore` command panic when viewing small binary files_](#explore-command-panic-when-viewing-small-binary-files-toc) + - [_Convert Path to `list` in main and preserve case_](#convert-path-to-list-in-main-and-preserve-case-toc) + - [_Fix improperly escaped strings in `stor update`_](#fix-improperly-escaped-strings-in-stor-update-toc) + - [_Fix: Auto `cd` should not canonicalize symbolic path_](#fix-auto-cd-should-not-canonicalize-symbolic-path-toc) + - [_Fix: Pressing Esc or Q was not closing `explore`_](#fix-pressing-kbd-esc-kbd-or-kbd-q-kbd-was-not-closing-explore-toc) + - [_Custom values are now expanded in tables_](#custom-values-are-now-expanded-in-tables-toc) + - [_Change how `and` and `or` operations are compiled to IR to support custom values_](#change-how-and-and-or-operations-are-compiled-to-ir-to-support-custom-values-toc) + - [_Fix `stor reset` when there are foreign keys_](#fix-stor-reset-when-there-are-foreign-keys-toc) + - [_New, improved `grid` icons_](#new-improved-grid-icons-toc) + - [_SHLVL decrement on `exec`_](#shlvl-decrement-on-exec-toc) + - [_`cp` reflink support on FreeBSD_](#cp-reflink-support-on-freebsd-toc) + - [_Fix root directory traversal issue_](#fix-root-directory-traversal-issue-toc) + - [_Fix `table` panic_](#fix-table-panic-toc) + - [_Parser fixes_](#parser-fixes-toc) + - [_Streaming improvements_](#streaming-improvements-toc) +- [_Notes for plugin developers_](#notes-for-plugin-developers-toc) +- [_Hall of fame_](#hall-of-fame-toc) +- [_Full changelog_](#full-changelog-toc) + +# Highlights and themes of this release [[toc](#table-of-contents)] ## Run-time pipeline input typechecking [[toc](#table-of-contents)] @@ -95,21 +144,17 @@ After this release, Nushell will also enforce the allowed input types at run-tim Because of this change, you may notice some new errors in your scripts like the one above. We've already adjusted the input/output types of many commands to better match their actual behavior (see [Command pipeline input/output type changes](#command-pipeline-input-output-type-changes-toc)), but if you run into an unexpected input type checking error, don't hesitate to file an issue! -# Changes - -## Additions +# Changes [[toc](#table-of-contents)] -### New command: `version check` +## Additions [[toc](#table-of-contents)] -Thanks to [@fdncred](https://github.com/fdncred) for the new `version check` command ([#14880](https://github.com/nushell/nushell/pull/14880)) -which can check your current Nushell version against the latest available release. +### New command: `version check` [[toc](#table-of-contents)] -### `generate` with input +Thanks to [@fdncred](https://github.com/fdncred) for the new `version check` command ([#14880](https://github.com/nushell/nushell/pull/14880)) which can check your current Nushell version against the latest available release. -In [#14804](https://github.com/nushell/nushell/pull/14804), [@Bahex](https://github.com/Bahex) added input support to `generate`. -Without pipeline input `generate` works same as before. +### `generate` with input [[toc](#table-of-contents)] -With pipeline input, `generate`'s closure argument is supplied two arguments, +In [#14804](https://github.com/nushell/nushell/pull/14804), [@Bahex](https://github.com/Bahex) added input support to `generate`. Without pipeline input, `generate` works same as before. But with pipeline input, `generate`'s closure argument is supplied two arguments: - an item from the input - the `next` value from the previous iteration @@ -120,12 +165,9 @@ This allows `generate` to act as a stateful `each` and more, filling the niche o Thanks to the new capabilities of `generate`, `iter scan` was updated to be streaming. It is also considerably more performant with large inputs. -### New operators: `has` and `not-has` +### New operators: `has` and `not-has` [[toc](#table-of-contents)] -In [#14841](https://github.com/nushell/nushell/pull/14841), [@Bahex](https://github.com/Bahex) added two new operators: `has` and `not-has`. -They are analogous to `in` and `not-in`, with the order of operands switched. - -This makes certain operations more ergonomic. +In [#14841](https://github.com/nushell/nushell/pull/14841), [@Bahex](https://github.com/Bahex) added two new operators: `has` and `not-has`. They are analogous to `in` and `not-in`, with the order of operands switched. This makes certain operations more ergonomic. ```nu [[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where ("e" in $it.children) @@ -133,14 +175,11 @@ This makes certain operations more ergonomic. [[name, children]; [foo, [a, b, c]], [bar [d, e, f]]] | where children has "e" ``` -### User autoload directories +### User autoload directories [[toc](#table-of-contents)] -Previous Nushell releases added the `vendor/autoload` directories which were automatically sourced during startup. In -[#14669](https://github.com/nushell/nushell/pull/14669), [@NotTheDr01ds](https://github.com/NotTheDr01ds) extended this to -include user directories. +Previous Nushell releases added the `vendor/autoload` directories which were automatically sourced during startup. In [#14669](https://github.com/nushell/nushell/pull/14669), [@NotTheDr01ds](https://github.com/NotTheDr01ds) extended this to include user directories. -During startup, any `.nu` files in `($nu.default-config-dir)/autoload` will be automatically sourced during startup. This occurs -after any vendor files have been processed, allowing user override of vendor settings if needed. +During startup, any `.nu` files in `($nu.default-config-dir)/autoload` will be automatically sourced during startup. This occurs after any vendor files have been processed, allowing user override of vendor settings if needed. ### Custom completers fall back to file completions [[toc](#table-of-contents)] @@ -156,11 +195,11 @@ $foo # => 3 ``` -### `format number` (renamed from `fmt`) +### `format number` (renamed from `fmt`) [[toc](#table-of-contents)] The `fmt` command, which is used for converting numbers to a variety of different formats, has been renamed to `format number` in [#14875](https://github.com/nushell/nushell/pull/14875). -### `chunks` supports binary input +### `chunks` supports binary input [[toc](#table-of-contents)] Thanks to [@Bahex](https://github.com/Bahex) in [#14649](https://github.com/nushell/nushell/pull/14649), `chunks` command now works on binary values and binary streams, making it easier to inspect and work on binary values and allowing partial reads from streams without collecting. @@ -171,16 +210,14 @@ For example, while working with a binary file or protocol, you might need to con # => 127.0.0.1 ``` -### `bytes split` +### New command: `bytes split` [[toc](#table-of-contents)] -In [#14652](https://github.com/nushell/nushell/pull/14652), [@Bahex](https://github.com/Bahex) added `bytes split`. -It is similar to `split row` and `lines`: +In [#14652](https://github.com/nushell/nushell/pull/14652), [@Bahex](https://github.com/Bahex) added `bytes split`. It is similar to `split row` and `lines`: - Like `split row`, it splits its input over an arbitrary delimiter. - Like `lines`, it is streaming. -Some programs can output text delimited by characters or sequences other than newlines ("\n"), commonly the NUL byte ("\0"), as the returned text may contain newlines. -If it is desirable to not collect the input or to act on a result as soon as possible `bytes split` can be used. +Some programs can output text delimited by characters or sequences other than newlines ("\n"), commonly the NUL byte ("\0"), as the returned text may contain newlines. If it is desirable to not collect the input or to act on a result as soon as possible `bytes split` can be used. For example, reading events from a socket or pipe: @@ -188,16 +225,15 @@ For example, reading events from a socket or pipe: open --raw ./events.sock | bytes split (char nul) | each { decode } ``` -### New command: `help pipe-and-redirect` +### New command: `help pipe-and-redirect` [[toc](#table-of-contents)] -Thanks [@WindSoilder](https://github.com/WindSoilder) for the new `help pipe-and-redirect command` which lists the pipe and redirect operators. -([#14821](https://github.com/nushell/nushell/pull/14821)) +Thanks [@WindSoilder](https://github.com/WindSoilder) for the new `help pipe-and-redirect command` which lists the pipe and redirect operators ([#14821](https://github.com/nushell/nushell/pull/14821)). -### The `start` command now works with non-HTTP URIs +### The `start` command now works with non-HTTP URIs [[toc](#table-of-contents)] -Thanks to [@anomius](https://github.com/anomius) for adding support for additional URI types to the `start` command in ([#14370](https://github.com/nushell/nushell/pull/14370)). +Thanks to [@anomius](https://github.com/anomius) for adding support for additional URI types to the `start` command in ([#14370](https://github.com/nushell/nushell/pull/14370)). This will call a system-specific opener under the hood (`open` for macOS, `start` for Windows, and `xdg-open` or some other program for Linux). -This means that, for example, if you have Spotify installed, the following will now start a Rickroll: +This means that, for example, if you have Spotify installed and configured to open `spotify:` links, then the following will now start a Rickroll: ```nu start spotify:track:4PTG3Z6ehGkBFwjybzWkR8?si=f9b4cdfc1aa14831 @@ -209,23 +245,17 @@ Of course, there are many more productive uses and URIs. The `debug profile` command now has a `--duration-values` flag, which allows outputting the run time of an instruction with proper duration values rather than floats representing milliseconds. This allows for more fine-grained measurement, and lets you use commands which work on duration values [#14749](https://github.com/nushell/nushell/pull/14749). -### Several `into` commands can now operate on their own type - -Thanks to to | [@Tyarel8](https://github.com/Tyarel8) in [#14845](https://github.com/nushell/nushell/pull/14845), -[#14881](https://github.com/nushell/nushell/pull/14881), and -[#14882](https://github.com/nushell/nushell/pull/14882), -the `into datetime`, `into cell-path`, and `into glob` commands can now accept (respectively), a `datimetime`, `cell-path`, or `glob`. +### Several `into` commands can now operate on their own type [[toc](#table-of-contents)] -The commands will now return the values unaltered in these cases. +Thanks to [@Tyarel8](https://github.com/Tyarel8) in [#14845](https://github.com/nushell/nushell/pull/14845), [#14881](https://github.com/nushell/nushell/pull/14881), and [#14882](https://github.com/nushell/nushell/pull/14882), the `into datetime`, `into cell-path`, and `into glob` commands can now accept (respectively), a `datimetime`, `cell-path`, or `glob`. The commands will now return the values unaltered in these cases. -### `touch` now supports globbing +### `touch` now supports globbing [[toc](#table-of-contents)] Thanks to [@hjetmundsen](https://github.com/hjetmundsen), the `utouch` (now `touch`) command supports globbing ([#14674](https://github.com/nushell/nushell/pull/14674)). -### `source null`/`use null` +### `source null`/`use null` [[toc](#table-of-contents)] -Thanks to [@Bahex](https://github.com/Bahex) in [#14773](https://github.com/nushell/nushell/pull/14773), `source` and `use` can be used with `null`, in which case the command is a noop. -This allows _conditionally sourcing files_, if the condition is decidable at parse time. +Thanks to [@Bahex](https://github.com/Bahex) in [#14773](https://github.com/nushell/nushell/pull/14773), `source` and `use` can be used with `null`, in which case the command is a noop. This allows conditionally sourcing files, if the condition is decidable at parse time. ```nu const file = path self local.nu @@ -234,7 +264,7 @@ const file = if ($file | path exists) { $file } else { null } source $file ``` -### `run-external` and `exec` now support list spreading +### `run-external` and `exec` now support list spreading [[toc](#table-of-contents)] With [#14765](https://github.com/nushell/nushell/pull/14765), lists can now be spread directly into `run-external` and `exec`: @@ -244,64 +274,94 @@ run-external ...$command # => hello world! ``` -### New config option: `use_ansi_coloring: 'auto'` +### New config option: `use_ansi_coloring: 'auto'` [[toc](#table-of-contents)] -[@cptpiepmatz](https://github.com/cptpiepmatz) `config.use_ansi_coloring: 'auto'` option in [#14647](https://github.com/nushell/nushell/pull/14647). -When set, Nushell will use ANSI coloring only when outputting to a terminal. This allows easier use of Nushell in embedded environments. +[@cptpiepmatz](https://github.com/cptpiepmatz) `config.use_ansi_coloring: 'auto'` option in [#14647](https://github.com/nushell/nushell/pull/14647). When set, Nushell will use ANSI coloring only when outputting to a terminal. This allows easier use of Nushell in embedded environments. When embedding Nushell in an environment that supports ANSI formatting, you can change the setting to `true`. -When embedding Nushell in an environment that supports ANSI formatting, you can change the setting to `true`. +#### New command: `config use-colors` -#### Related new command: `config use-colors` +The new `config use-colors` command will return the evaluated result of the `use_ansi_coloring` option. This allows scripts and custom commands to determine whether to add or strip ANSI formatting from their output ([#14683](https://github.com/nushell/nushell/pull/14683)). -The new `config use-colors` command will return the evaluated result of the `use_ansi_coloring` option. This allows scripts and custom commands to -determine whether to add or strip ANSI formatting from their output ([#14683](https://github.com/nushell/nushell/pull/14683)). +### New config option: `banner: 'short'` [[toc](#table-of-contents)] -### New config option: `banner: 'short'` +With [#14638](https://github.com/nushell/nushell/pull/14638), users can now configuration Nushell to start with a "short" welcome banner. The "short" banner will only show the startup time, allowing the user to populate the rest of the banner information as desired. -With [#14638](https://github.com/nushell/nushell/pull/14638), users can now configuration Nushell to start with a "short" welcome banner. +### `move --first`/`--list` flags [[toc](#table-of-contents)] -The "short" banner will only show the startup time, allowing the user to populate the rest of the banner information as desired. +[@Coca162](https://github.com/Coca162) added `--first`/`--last` flags to the `move` command in [#14961](https://github.com/nushell/nushell/pull/14961), providing a convenient shorthand for moving a column to the first or last position in a table. -### `move --first`/`--list` flags +### `find --no-highlight` switch [[toc](#table-of-contents)] -[@Coca162](https://github.com/Coca162) added `--first`/`--last` flags to the `move` command in [#14961](https://github.com/nushell/nushell/pull/14961), -providing a convenient shorthand for moving a column to the first or last position in a table. +With [#14970](https://github.com/nushell/nushell/pull/14970), [@Mudada](https://github.com/Mudada) added `--no-highlight` to the `find` command. This provides an easy way to remove ANSI formatting and highlighting from non-regex `find`s and still keep the result as a table. -### `find --no-highlight` switch - -With [#14970](https://github.com/nushell/nushell/pull/14970), -[@Mudada](https://github.com/Mudada) added `--no-highlight` to the `find` command. This provides an easy way to remove ANSI formatting and -highlighting from non-regex `find`s and still keep the result as a table. - -### `seq date` enhancements +### `seq date` enhancements [[toc](#table-of-contents)] The `seq date` command can now use any duration for the `--increment` thanks to [@pyz4](https://github.com/pyz4)'s [#14903](https://github.com/nushell/nushell/pull/14903). -### `content_type` metadata is now assigned to known filetypes that don't have a `from` convertor +### `content_type` metadata is now assigned to known filetypes that don't have a `from` convertor [[toc](#table-of-contents)] -In ([#14670](https://github.com/nushell/nushell/pull/14670)), [@NotTheDr01ds](https://github.com/NotTheDr01ds) changed the `open` command to assign `content_type` metadata when a `from` convertor isn't -available for a known filetype. This primarily allows `open file.nu` to provide `application/x-nuscript` as the `content-type` even when -not using `open --raw`. +In ([#14670](https://github.com/nushell/nushell/pull/14670)), [@NotTheDr01ds](https://github.com/NotTheDr01ds) changed the `open` command to assign `content_type` metadata when a `from` convertor isn't available for a known filetype. This primarily allows `open file.nu` to provide `application/x-nuscript` as the `content-type` even when not using `open --raw`. #### `content_type` set for `config nu` output -Similarly in [#14666](https://github.com/nushell/nushell/pull/14666), [@cptpiepmatz](https://github.com/cptpiepmatz) updated the `config nu` command to add -`content_type` metadata. +Similarly in [#14666](https://github.com/nushell/nushell/pull/14666), [@cptpiepmatz](https://github.com/cptpiepmatz) updated the `config nu` command to add `content_type` metadata. These two changes allow users to create a disable hook which will automatically `nu-highlight` the results. + +## Breaking changes [[toc](#table-of-contents)] + +### `$env.config.filesize` changes [[toc](#table-of-contents)] + +This release saw an overhaul to file size formatting and related config settings ([#14397](https://github.com/nushell/nushell/pull/14397)). Previously, two separate config settings, `$env.config.filesize.format` and `$env.config.filesize.metric`, determined how file sizes were formatted. `format` determined the unit to use and `metric` determined whether to use metric or binary units. However, the two settings were allowed to conflict. E.g., `format` could be set to a binary unit, but `metric` could be set to `true`. To avoid this confusion, the file size unit is now controlled through a single option: `$env.config.filesize.unit`. It can be set to one of the following values: + +- A metric unit: `kB`, `MB`, `GB`, `TB`, `PB`, or `EB` (case sensitive!). +- A binary unit: `KiB`, `MiB`, `GiB`, `TiB`, `PiB`, or `EiB` (case sensitive!). +- `metric`: automatically choose a metric unit of an appropriate scale. In the old config, this would be equivalent to `{ format: auto, metric: true }`. +- `binary`: automatically choose a binary unit of an appropriate scale. In the old config, this would be equivalent to `{ format: auto, metric: false }`. + +```nu +# unit = kB +1kB # => 1 kB +1KiB # => 1.024 kB + +# unit = KiB +1kB # => 0.9765625 KiB +1KiB # => 1 KiB + +# unit = metric +1000B # => 1 kB +1024B # => 1.024 kB +10_000MB # => 10 GB +10_240MiB # => 10.73741824 GB + +# unit = binary +1000B # => 1000 B +1024B # => 1 KiB +10_000MB # => 9.313225746154785 GiB +10_240MiB # => 10 GiB +``` + +In addition, you can now control how many decimal places file sizes should be formatted with using `$env.config.filesize.precision`. When set to `null`, as many decimal places as necessary will be printed. Otherwise, when set to a integer, that number of decimal places will be shown. -These two changes allow users to create a disable hook which will automatically `nu-highlight` the results. +```nu +# precision = 1 +1001B # => 1.0 kB -## Breaking changes +# precision = 0 +1001B # => 1 kB + +# precision = null +1001B # => 1.001 kB +1000B # => 1 kB +``` -| [@IanManske](https://github.com/IanManske) | Improve and fix filesize formatting/display | [#14397](https://github.com/nushell/nushell/pull/14397) | +The default `$env.config.filesize` is `{ unit: metric, precision: 1 }`. -### `ENV_CONVERSIONS` take effect immediately +### `format filesize` [[toc](#table-of-contents)] -Thanks to [@Bahex](https://github.com/Bahex) in [#14591](https://github.com/nushell/nushell/pull/14591), when `$env.ENV_CONVERSIONS` is updated, changes take effect immediately. +Related to changes above, `format filesize` is now case-sensitive for the file size unit to avoid ambiguity for `KB` ([#14397](https://github.com/nushell/nushell/pull/14397)). -Previously, to make use of `ENV_CONVERSIONS` in your `config.nu`, you would need to set it up in `env.nu`, as it would only take effect after the file it was modified in was read. -Now, you can set it in `config.nu` and immediately make use of its results. +### `ENV_CONVERSIONS` take effect immediately [[toc](#table-of-contents)] -This also makes it useful for use in scripts and other modules. +Thanks to [@Bahex](https://github.com/Bahex) in [#14591](https://github.com/nushell/nushell/pull/14591), when `$env.ENV_CONVERSIONS` is updated, changes take effect immediately. Previously, to make use of `ENV_CONVERSIONS` in your `config.nu`, you would need to set it up in `env.nu`, as it would only take effect after the file it was modified in was read. Now, you can set it in `config.nu` and immediately make use of its results. This also makes it useful for use in scripts and other modules. ### External completers fall back to file completions only on `null` [[toc](#table-of-contents)] @@ -338,42 +398,50 @@ Additionally, the following commands have temporarily been given an input type o - `format date` - `into datetime` -## Deprecations +### N-dots tweak [[toc](#table-of-contents)] + +With [#14755](https://github.com/nushell/nushell/pull/14755), [n-dots](/book/moving_around.md#changing-the-current-directory) such as `...` are no longer expanded when prefixed with `./` (ex. `...` is expanded, `./...` is no longer expanded). This should make the feature less surprising, while also providing better compatibility with external programs using `...` as part of their CLI. + +## Deprecations [[toc](#table-of-contents)] The following commands have been deprecated in 0.102.0. They remain available, but will be removed in a future release. We recommend updating existing code to use the replacement command. -### `into bits` +### `into bits` [[toc](#table-of-contents)] `into bits` is deprecated and replaced with the new `format bits` command with ([#14634](https://github.com/nushell/nushell/pull/14634). -### `range` +### `range` [[toc](#table-of-contents)] `range` is deprecated and replaced with the new `slice` command with [#14825](https://github.com/nushell/nushell/pull/14825). -### `fmt` +### `fmt` [[toc](#table-of-contents)] `fmt` is deprecated and replaced with the new `format number` command with [#14875](https://github.com/nushell/nushell/pull/14875). -## Removals +## Removals [[toc](#table-of-contents)] -### `utouch` +### `utouch` [[toc](#table-of-contents)] `utouch` is now the `touch` command in [#14721](https://github.com/nushell/nushell/pull/14721). -### Previously deprecated `split-by`, `date to-record`, and `date to-table` +### `split-by` [[toc](#table-of-contents)] -The `split-by`, `date to-record`, and `date to-table` commands where previously deprecate in 0.101 and have been removed in this release ([#14726](https://github.com/nushell/nushell/pull/14726)) +The `split-by` command was previously deprecated in 0.101 and have been removed in this release ([#14726](https://github.com/nushell/nushell/pull/14726)). -## Bug fixes and other changes +### `date to-record` [[toc](#table-of-contents)] -### Immediate error return [[toc](#table-of-contents)] +The `date to-record` command was previously deprecated in 0.101 and have been removed in this release ([#14726](https://github.com/nushell/nushell/pull/14726)). -With [#14874](https://github.com/nushell/nushell/pull/14874), if Nushell detects that an error value passed to a command as pipeline input or as an argument, it will immediately return that error rather than continuing execution. Nested errors (errors in lists, records, etc.) are unaffected. +### `date to-table` [[toc](#table-of-contents)] -### N-dots tweak [[toc](#table-of-contents)] +The `date to-table` command was previously deprecated in 0.101 and have been removed in this release ([#14726](https://github.com/nushell/nushell/pull/14726)). -With [#14755](https://github.com/nushell/nushell/pull/14755), [n-dots](/book/moving_around.md#changing-the-current-directory) such as `...` are no longer expanded when prefixed with `./` (ex. `...` is expanded, `./...` is no longer expanded). This should make the feature less surprising, while also providing better compatibility with external programs using `...` as part of their CLI. +## Bug fixes and other changes [[toc](#table-of-contents)] + +### Immediate error return [[toc](#table-of-contents)] + +With [#14874](https://github.com/nushell/nushell/pull/14874), if Nushell detects that an error value passed to a command as pipeline input or as an argument, it will immediately return that error rather than continuing execution. Nested errors (errors in lists, records, etc.) are unaffected. ### `config reset` fix [[toc](#table-of-contents)] @@ -387,7 +455,7 @@ Previously, the `print` command would print the "empty list" placeholder text wi With [#14757](https://github.com/nushell/nushell/pull/14757), spans will now be maintained in some places where they were previously overridden by command calls. Some errors should now point to the actual source of a value, rather than pointing to the command which used it. -### Range related bug fixes +### Range related bug fixes [[toc](#table-of-contents)] In [#14863](https://github.com/nushell/nushell/pull/14863), [@Bahex](https://github.com/Bahex) fixed range related bugs in @@ -396,25 +464,25 @@ In [#14863](https://github.com/nushell/nushell/pull/14863), [@Bahex](https://git - `slice` - `bytes at` -### `std` enhancements +### `std` enhancements [[toc](#table-of-contents)] In [#14763](https://github.com/nushell/nushell/pull/14763), [@Bahex](https://github.com/Bahex) made small, backwards compatible enhancements to `std` - `iter find` and `iter find-index` work better with streams, only consuming the input up to the first matching item. - Added `log set-level`, a small convenience command for changing the current logging level. -### Nuon conversions of range values now keep step size +### Nuon conversions of range values now keep step size [[toc](#table-of-contents)] Previously, the step size of range values were discarded when converting `to nuon`. With [#14687](https://github.com/nushell/nushell/pull/14687), the `to nuon` conversion of `range` values now include the step size. As a result, `to nuon`/`from nuon` round trips now work for these values. Thanks [@Bahex](https://github.com/Bahex)! -### `explore` command panic when viewing small binary files +### `explore` command panic when viewing small binary files [[toc](#table-of-contents)] [#14592](https://github.com/nushell/nushell/pull/14592) fixes a panic in `explorer` when viewing small binary files thanks to [@ChetanXpro](https://github.com/ChetanXpro). -### Convert Path to `list` in main and preserve case +### Convert Path to `list` in main and preserve case [[toc](#table-of-contents)] With [#14764](https://github.com/nushell/nushell/pull/14764), the system `PATH` is now converted to a list before the configuration files are processed. An explicit `ENV_CONVERSIONS` is no longer required for the `PATH`. @@ -423,84 +491,83 @@ It should be safe to remove any existing `ENV_CONVERSIONS` entry for `PATH`. The case of the `PATH` is also now preserved during this conversion. -### Fix improperly escaped strings in `stor update` +### Fix improperly escaped strings in `stor update` [[toc](#table-of-contents)] [@NotTheDr01ds](https://github.com/NotTheDr01ds) fixed an issue in `stor update` which prevented single quotes from being stored properly ([#14921](https://github.com/nushell/nushell/pull/14921)). -### Fix: Auto `cd` should not canonicalize symbolic path +### Fix: Auto `cd` should not canonicalize symbolic path [[toc](#table-of-contents)] With [#14708](https://github.com/nushell/nushell/pull/14708), [@WindSoilder](https://github.com/WindSoilder) fixes an issue where using `..` to go up one directory from a symlink would result in the wrong PWD. -### Fix: Pressing Esc or Q was not closing `explore` +### Fix: Pressing Esc or Q was not closing `explore` [[toc](#table-of-contents)] Thanks to [@dam4rus](https://github.com/dam4rus), Esc and Q now properly close `explore` once again ([#14941](https://github.com/nushell/nushell/pull/14941)). -### Custom values are now expanded in tables +### Custom values are now expanded in tables [[toc](#table-of-contents)] -Previously, custom values were being stringified in tables. -[#14760](https://github.com/nushell/nushell/pull/14760) expands these to display as Nushell values -thanks to [@dead10ck](https://github.com/dead10ck). +Previously, custom values were being stringified in tables. [#14760](https://github.com/nushell/nushell/pull/14760) expands these to display as Nushell values thanks to [@dead10ck](https://github.com/dead10ck). -### Change how `and` and `or` operations are compiled to IR to support custom values +### Change how `and` and `or` operations are compiled to IR to support custom values [[toc](#table-of-contents)] [#14653](https://github.com/nushell/nushell/pull/14653) allows the `and` and `or` operators to support custom values once again thanks to [@devyn](https://github.com/devyn). -### Fix `stor reset` when there are foreign keys +### Fix `stor reset` when there are foreign keys [[toc](#table-of-contents)] Thanks to [@fdncred](https://github.com/fdncred) for fixing an issue where `stor reset` wasn't properly dropping tables ([#14772](https://github.com/nushell/nushell/pull/14772)). -### New, improved grid icons +### New, improved `grid` icons [[toc](#table-of-contents)] `grid --icons` now uses the icons from the `devicons` crate after [#14827](https://github.com/nushell/nushell/pull/14827). -### SHLVL decrement on `exec` +### SHLVL decrement on `exec` [[toc](#table-of-contents)] Thanks [@rikukiix](https://github.com/rikukiix) for fixing `exec` to properly decrement the `SHLVL` environment variable ([#14707](https://github.com/nushell/nushell/pull/14707)). -### `cp`: Disable unsupported reflink mode in FreeBSD builds +### `cp` reflink support on FreeBSD [[toc](#table-of-contents)] Thanks to [@sgvictorino](https://github.com/sgvictorino), `cp` no longer errors with "--reflink is only supported on Linux and macOS" ([#14677](https://github.com/nushell/nushell/pull/14677)). -### Fix root directory traversal issue +### Fix root directory traversal issue [[toc](#table-of-contents)] [@userwiths](https://github.com/userwiths) fixed an issue where `cd ..` at the root of a drive was returning the incorrect directory ([#14747](https://github.com/nushell/nushell/pull/14747)). Thank you! -### Fix unexpanded table panic +### Fix `table` panic [[toc](#table-of-contents)] [#14710](https://github.com/nushell/nushell/pull/14710) fixes an issue where nested data was creating a panic when unexpanded in a display hook. Thanks [@zhiburt](https://github.com/zhiburt)! -### Parser fixes +### Parser fixes [[toc](#table-of-contents)] - Thanks [@WindSoilder](https://github.com/WindSoilder) for fixing an issue where a duration suffix in a variable name in a range confused the parser ([#14848](https://github.com/nushell/nushell/pull/14848)). - Thanks [@blindFS](https://github.com/blindFS) for multiple parser fixes (and even more LSP fixes!): - - FixeS `$in`/`$it` having an unknown span ([#14789](https://github.com/nushell/nushell/pull/14789)) + - Fixes `$in`/`$it` having an unknown span ([#14789](https://github.com/nushell/nushell/pull/14789)). - Fixed an issue where the span of `$it`/`$in` was set to the first character of its scope ([#14817](https://github.com/nushell/nushell/pull/14817)). - Fixed a missing span of the entire block of a module file ([#14889](https://github.com/nushell/nushell/pull/14889)). - Fixed an issue where the wrong span was highlighted when an `else` block had a parse error ([#14912](https://github.com/nushell/nushell/pull/14912)). - Fixed the span of a keyword expression not including its subsidiary expression ([#14928](https://github.com/nushell/nushell/pull/14928)). - [@RobbingDaHood](https://github.com/RobbingDaHood) fixed multiple issues with parsed comments not being prefixed with a space or tab, or being the beginning of a token ([#14616](https://github.com/nushell/nushell/pull/14616)). Thank you! -### Streaming improvements +### Streaming improvements [[toc](#table-of-contents)] -- `du` now streams - Thanks [@WindSoilder](https://github.com/WindSoilder)! ([#14665](https://github.com/nushell/nushell/pull/14665)) -- `get` and `reject` now support streaming - Thanks [@cosineblast](https://github.com/cosineblast)! ([#14622](https://github.com/nushell/nushell/pull/14622)) +- `du` now streams thanks to [@WindSoilder](https://github.com/WindSoilder)! ([#14665](https://github.com/nushell/nushell/pull/14665)) +- `get` and `reject` now support streaming thanks to [@cosineblast](https://github.com/cosineblast)! ([#14622](https://github.com/nushell/nushell/pull/14622)) +- `bytes at` now streams thanks to [@simon-curtis](https://github.com/simon-curtis) in [#13552](https://github.com/nushell/nushell/pull/13552). Additionally, `skip` and `take` should now stream binary output when provided streaming binary input. -| [@simon-curtis](https://github.com/simon-curtis) | Implementing ByteStream interruption on infinite stream | [#13552](https://github.com/nushell/nushell/pull/13552) | +# Notes for plugin developers [[toc](#table-of-contents)] -# Notes for plugin developers + -# Hall of fame +# Hall of fame [[toc](#table-of-contents)] Thanks to all the contributors below for helping us solve issues, improve documentation, refactor code, and more! :pray: @@ -539,7 +606,7 @@ Thanks to all the contributors below for helping us solve issues, improve docume | [@tmillr](https://github.com/tmillr) | fix(cli): completion in nested blocks | [#14856](https://github.com/nushell/nushell/pull/14856) | | [@tsukimizake](https://github.com/tsukimizake) | stop the prompt from removing the last newline | [#14590](https://github.com/nushell/nushell/pull/14590) | -# Full changelog +# Full changelog [[toc](#table-of-contents)] | author | title | link | | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | From fb6096534d9a38254ac0ebb4f3f930bff7997e70 Mon Sep 17 00:00:00 2001 From: Yash Thakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 4 Feb 2025 21:40:50 -0500 Subject: [PATCH 13/13] Include I/O error refactor PR (#1782) --- blog/2025-02-04-nushell_0_102_0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/2025-02-04-nushell_0_102_0.md b/blog/2025-02-04-nushell_0_102_0.md index 41421589a04..ebb3ee179a6 100644 --- a/blog/2025-02-04-nushell_0_102_0.md +++ b/blog/2025-02-04-nushell_0_102_0.md @@ -565,7 +565,7 @@ in a display hook. Thanks [@zhiburt](https://github.com/zhiburt)! # Notes for plugin developers [[toc](#table-of-contents)] - +[@cptpiepmatz](https://github.com/cptpiepmatz) refactored I/O errors in [#14927](https://github.com/nushell/nushell/pull/14927), simplifying them and encouraging including spans in error messages. A new `ShellError::Io(IoError)` variant has been added to `ShellError`, replacing `FileNotFound`, `IOError`, and other variants. The `Io` variant holds an instance of the newly added `IoError` struct, which contains information common to I/O errors, such as error kind, span, and optional extra information. See the linked PR for more information, including how to construct `IoError` values. # Hall of fame [[toc](#table-of-contents)]