Skip to content

Edit 0.93.0 release notes #1360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 117 additions & 1 deletion blog/2024-04-30-nushell_0_93_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ As part of this release, we also publish a set of optional plugins you can insta
- [*Our set of commands is evolving*](#our-set-of-commands-is-evolving-toc)
- [*New commands*](#new-commands-toc)
- [*Changes to existing commands*](#changes-to-existing-commands-toc)
- [*`with-env`*](#with-env-toc)
- [*`load-env`*](#load-env-toc)
- [*`last`*](#last-toc)
- [*`drop`*](#drop-toc)
- [*`skip`*](#skip-toc)
- [*`group-by`*](#group-by-toc)
- [*`timeit`*](#timeit-toc)
- [*`kill`*](#kill-toc)
- [*`ls`*](#ls-toc)
- [*`du`*](#du-toc)
- [*`into-filesize`*](#into-filesize-toc)
- [*`explain`*](#explain-toc)
- [*Deprecated commands*](#deprecated-commands-toc)
- [*Removed commands*](#removed-commands-toc)
<!-- TODO: please add links to the other sections here
Expand Down Expand Up @@ -81,10 +93,114 @@ Thanks to all the contributors below for helping us making the documentation of
| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) |

## Our set of commands is evolving [[toc](#table-of-content)]
As usual, new release rhyms with changes to commands!

### New commands [[toc](#table-of-content)]
### Changes to existing commands [[toc](#table-of-content)]

#### `with-env` [[toc](#table-of-content)]

::: warning Breaking change
See a full overview of the [breaking changes](#breaking-changes-toc)
:::

The environment variable list form of `with-env` is now deprecated aftter [#12523](https://github.com/nushell/nushell/pull/12523):
```nushell
with-env [X Y W Z] { $env.X }
```

Instead, one should use the record form:
```nushell
with-env { X: 'Y', W: 'Z' } { $env.X }
```

Additionally, setting the `PWD` variable through `with-env` is now disallowed.

#### `load-env` [[toc](#table-of-content)]

::: warning Breaking change
See a full overview of the [breaking changes](#breaking-changes-toc)
:::

With [#12522](https://github.com/nushell/nushell/pull/12522), setting the `PWD` variable through `load-env` is now disallowed.


#### `last` [[toc](#table-of-content)]

::: warning Breaking change
See a full overview of the [breaking changes](#breaking-changes-toc)
:::

To be consistent with `first` and other commands, `last` now errors if the input is empty ([#12478](https://github.com/nushell/nushell/pull/12478)).

To suppress the error and return null if an input is empty, wrap `last` in a `try` block:
```nushell
[] | try { last }
```

#### `drop` [[toc](#table-of-content)]

::: warning Breaking change
See a full overview of the [breaking changes](#breaking-changes-toc)
:::

With [#12479](https://github.com/nushell/nushell/pull/12479), `drop` will now error if the number of rows/columns is negative.

#### `skip` [[toc](#table-of-content)]

::: warning Breaking change
See a full overview of the [breaking changes](#breaking-changes-toc)
:::

To be consistent with `take` and other commands, `skip` no longer accepts external streams as input ([#12559](https://github.com/nushell/nushell/pull/12559)).

#### `group-by` [[toc](#table-of-content)]

::: warning Breaking change
See a full overview of the [breaking changes](#breaking-changes-toc)
:::

If a closure was used as the grouper for `group-by`, then errors inside the closure would previously be ignored. Instead, `group-by` would put the row/item under the `error` group.
With [#12508](https://github.com/nushell/nushell/pull/12508), errors are no longer ignored and will immediately be bubbled up.

#### `timeit` [[toc](#table-of-content)]

::: warning Breaking change
See a full overview of the [breaking changes](#breaking-changes-toc)
:::

After [#12465](https://github.com/nushell/nushell/pull/12465), the `timeit` command will no longer capture external command output, instead redirecting output to the terminal/stdio.

#### `kill` [[toc](#table-of-content)]

::: warning Breaking change
See a full overview of the [breaking changes](#breaking-changes-toc)
:::

The `kill` command used to return a stream of values in certain cases. In [#12480](https://github.com/nushell/nushell/pull/12480) this was changed so that `kill` now always returns a single value (null or a string).

#### `ls` [[toc](#table-of-content)]

Instead of a single optional path, the `ls` command now takes a rest argument of paths ([#12327](https://github.com/nushell/nushell/pull/12327)). I.e., you can spread a list into `ls`:
```nushell
ls ...[directory1 directory2]
```
or simply `ls` multiple directories:
```nushell
ls directory1 directory2
```

#### `du` [[toc](#table-of-content)]

In the `ls` PR ([#12327](https://github.com/nushell/nushell/pull/12327)), the same changes were also made to `du`. So now, `du` takes a rest argument of paths just like `ls`.

#### `into filesize` [[toc](#table-of-content)]

Thanks to [@singh-priyank](https://github.com/singh-priyank) in [#12443](https://github.com/nushell/nushell/pull/12443), `into filesize` can now parse negative filesizes from strings.

#### `explain` [[toc](#table-of-content)]

With [#12432](https://github.com/nushell/nushell/pull/12432), the `type` column returned from `explain` should no longer contain `string` for every row.

### Deprecated commands [[toc](#table-of-content)]
### Removed commands [[toc](#table-of-content)]

Expand Down