diff --git a/blog/2024-09-17-nushell_0_98_0.md b/blog/2024-09-17-nushell_0_98_0.md index 95c85bdcd67..1bde318b382 100644 --- a/blog/2024-09-17-nushell_0_98_0.md +++ b/blog/2024-09-17-nushell_0_98_0.md @@ -5,6 +5,7 @@ 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.98.0 of Nu. This release adds... --- + # Nushell 0.98.0 @@ -12,6 +13,7 @@ excerpt: Today, we're releasing version 0.98.0 of Nu. This release adds... Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines. + Today, we're releasing version 0.98.0 of Nu. This release adds... # Where to get it @@ -21,6 +23,7 @@ Nu 0.98.0 is available as [pre-built binaries](https://github.com/nushell/nushel 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 content + - [_Highlights and themes of this release_](#highlights-and-themes-of-this-release-toc) - [_Changes to commands_](#changes-to-commands-toc) - [_Additions_](#additions-toc) @@ -49,6 +52,7 @@ As part of this release, we also publish a set of optional plugins you can insta --> # Highlights and themes of this release [[toc](#table-of-content)] + +## Removing support for the system clipboard + +With [#13694](https://github.com/nushell/nushell/pull/13694), support for the system clipboard in keybinds has been removed, as this is not something that we think we can provide good, cross-platform support for in a secure manner. Namely, + +- Tests for the clipboard feature are lacking due to the difficulty in setting up tests on each platform. +- The clipboard feature is known to be problematic on certain systems, potentially affecting startup times. Due to the lack of tests, other unfound issues may be lurking. +- The system clipboard adds a potential attack surface. +- The clipboard feature adds 1MB to the binary size. + +So, going forward, users that want the system clipboard functionality will have to compile a custom build of nushell by enabling the `system-clipboard` cargo feature. As an alternative, we recommend users delegate system clipboard handling to their terminal. + # Changes to commands [[toc](#table-of-content)] ## Additions [[toc](#table-of-content)] +### `metadata access` + +Thanks to [@Bahex](https://github.com/Bahex) in [#13785](https://github.com/nushell/nushell/pull/13785), a new `metadata access` command was added. It takes a closure argument, and the first argument to the closure will be the metadata record. Additionally, the pipeline input to `metadata access` will be forwarded to the closure as is. So, unlike the `metadata` command, this new command allows you to get the metadata of a pipeline without consuming the pipeline. + +### `split column --numbered` + +Thanks to [@nome](https://github.com/nome) in [#13831](https://github.com/nushell/nushell/pull/13831), a `--numbered` flag was added to `split column` which limits the number of times to split the input string (just like `split row --numbered`). + ## Breaking changes [[toc](#table-of-content)] +### `into record` + +In [#13637](https://github.com/nushell/nushell/pull/13637), several changes/improvements were made to list inputs for `into record`: + +- A list of pairs of values will be converted into a record. For example: + ```nushell + [[a 1] [b 2]] | into record + # { a: 1, b: 2 } + ``` +- A list of records are merged into a single record (records at the end of the list have precedence): + ```nushell + [{ a: 1 } { b: 2 } { a: 3 }] | into record + # { a: 3, b: 2 } + ``` + +As a consequence, the previous behavior for list inputs has been removed (the index of each item would be used as the key). Instead, this old behavior can now be accomplished through either of the following: + +```nushell +0.. | zip $list | into record + +$list | enumerate | transpose -r -d | into record +``` + +Additionally, `into record` no longer supports range values as input. + +After [#13650](https://github.com/nushell/nushell/pull/13650), `into record` also now outputs `millisecond`, `microsecond`, and `nanosecond` columns when provided with a datetime value. + +### `clear` + +In [#13821](https://github.com/nushell/nushell/pull/13821), [@T3sT3ro](https://github.com/T3sT3ro) changed the `clear` command to clear the entire scrollback buffer. As such, the `--all` flag was removed, since it is now the default behavior. Instead, a `--keep-scrollback` flag was added, which when used, makes `clear` clear only the terminal (the previous default behavior). + +### `path exists` + +After [#13763](https://github.com/nushell/nushell/pull/13763), if an I/O error occurs when checking if a path exists, `false` is now returned instead of throwing an error (this includes errors due to insufficient permissions). + ## Deprecations [[toc](#table-of-content)] ## Removals [[toc](#table-of-content)] +### `str deunicode` + +In [#13693](https://github.com/nushell/nushell/pull/13693), the `str deunicode` command (added in v0.96.0) has been removed due to concerns with stability and support post v1.0. + ## Bug fixes and other changes [[toc](#table-of-content)] +### `find` + +After [#13848](https://github.com/nushell/nushell/pull/13848), the find command no longer strips tabs from its input. + +Also, regex patterns are now properly escaped after [#13792](https://github.com/nushell/nushell/pull/13792). + +### `detect columns` + +One source of panics was fixed in [#13752](https://github.com/nushell/nushell/pull/13752). + # All breaking changes [[toc](#table-of-content)] + \ No newline at end of file +-->