Skip to content

Commit

Permalink
Merge branch 'nushell:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanceilaks authored Aug 4, 2024
2 parents 2b302d7 + 9af3d7f commit cf675e3
Show file tree
Hide file tree
Showing 566 changed files with 3,365 additions and 1,536 deletions.
Binary file added assets/images/0_96_0_explore_ir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
664 changes: 664 additions & 0 deletions blog/2024-07-23-nushell_0_96_0.md

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions blog/2024-07-29-nushell_0_96_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: Nushell 0.96.1
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.96.1 of Nu. This release fixes various bugs introduced by the 0.96.0 release, including the behavior of `$in` in range expressions, and some minor fixes to IR evaluation and plugins.
---

# Nushell 0.96.1

Nushell, or Nu for short, is a new shell that takes a modern, structured approach to your command line. It works seamlessly with the data from your filesystem, operating system, and a growing number of file formats to make it easy to build powerful command line pipelines.

Today, we're releasing version 0.96.1 of Nu. This release fixes various bugs introduced by the 0.96.0 release, including the behavior of `$in` in range expressions, and some minor fixes to IR evaluation and plugins.

# Where to get it

Nu 0.96.1 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.96.1) 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_<plugin name>`.

# Table of content

- [_Highlights and themes of this release_](#highlights-and-themes-of-this-release-toc)
- [_Fix `$in` in range expressions_](#fix-in-in-range-expressions-toc)
- [_IR: fix incorrect capturing of subexpressions_](#ir-fix-incorrect-capturing-of-subexpressions-toc)
- [_Clean up arguments added to stack after `CallDecl` engine call_](#clean-up-arguments-added-to-stack-after-calldecl-engine-call-toc)
- [_Changes to commands_](#changes-to-commands-toc)
- [_Bug fixes and other changes_](#bug-fixes-and-other-changes-toc)
- [_`keybindings list`_](#keybindings-list-toc)
- [_Full changelog_](#full-changelog-toc)

# Highlights and themes of this release [[toc](#table-of-content)]

## Fix `$in` in range expressions [[toc](#table-of-content)]

0.96.0 changed how `$in`-containing expressions worked to make them more consistent, but we missed checking the expressions contained within ranges. Piping to a range expression containing `$in` has now been fixed:

```nushell
3 | 0..$in | each { print }
```

Thanks to [Maxim Uvarov](https://github.com/maxim-uvarov) for finding and reporting this issue!

## IR: fix incorrect capturing of subexpressions [[toc](#table-of-content)]

A bug was found by user `warp` over on Discord in the new internal representation engine that we introduced as a preview in 0.96.0. Subexpressions (i.e., expressions in parentheses) should not have any impact on the capturing behavior of external commands, but this was implemented incorrectly. In 0.96.0, the following code produced no output when run with IR even though it should have still resulted in a message being printed:

```
(nu -c 'print foo'); null
```

This was most noticeable when running some kind of interactive command, as it would result in stdout not being a TTY. We have fixed the IR implementation to match the behavior of the AST evaluator.

## Clean up arguments added to stack after `CallDecl` engine call [[toc](#table-of-content)]

A memory leak was present when using the new [`CallDecl` engine call](../contributor-book/plugin_protocol_reference.md#calldecl-engine-call) from plugins. The arguments included in the call would persist in memory until the plugin call ended, rather than being removed at the end of the engine call. This has been fixed.

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

## Bug fixes and other changes [[toc](#table-of-content)]

### `keybindings list` [[toc](#table-of-content)]

The `keybindings list` command was unintentionally changed to acts as if no options had been selected if none of the toggle switches for different categories had been provided. This would result in an empty list. The previous behavior of returning all categories by default has been restored.

# Full changelog [[toc](#table-of-content)]

- [devyn](https://github.com/devyn) created
- [Fix bad method links in docstrings](https://github.com/nushell/nushell/pull/13471)
- [Clean up arguments added to stack after `CallDecl` engine call](https://github.com/nushell/nushell/pull/13469)
- [IR: fix incorrect capturing of subexpressions](https://github.com/nushell/nushell/pull/13467)
- [Fix `keybindings list` being empty by default](https://github.com/nushell/nushell/pull/13456)
- [Fix `$in` in range expressions](https://github.com/nushell/nushell/pull/13447)
- [Bump version to `0.96.1`](https://github.com/nushell/nushell/pull/13439)
- [fdncred](https://github.com/fdncred) created
- [update release-pkg.nu with working url for less license](https://github.com/nushell/nushell/pull/13451)
12 changes: 5 additions & 7 deletions book/dataframes.md
Original file line number Diff line number Diff line change
Expand Up @@ -731,13 +731,11 @@ Using the first dataframe that we created we can do something like this
```nu
> let mask_2 = $df_1 | polars col first | polars is-in [b c]
> $mask_2
╭──────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ input │ [table 2 rows] │
│ function │ Boolean(IsIn) │
│ options │ FunctionOptions { collect_groups: ElementWise, fmt_str: "", input_wildcard_expansion: false, returns_scal │
│ │ ar: false, cast_to_supertypes: true, allow_rename: false, pass_name_to_apply: false, changes_length: fals │
│ │ e, check_lengths: UnsafeBool(true), allow_group_aware: true } │
╰──────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────┬─────────────────────────╮
│ input │ [table 2 rows] │
│ function │ Boolean(IsIn) │
│ options │ FunctionOptions { ... } │
╰──────────┴─────────────────────────╯
```

and this new mask can be used to filter the dataframe
Expand Down
Loading

0 comments on commit cf675e3

Please sign in to comment.