nushell/crates
Devyn Cairns 5f7afafe51
IR: fix incorrect capturing of subexpressions (#13467)
# Description


[Discovered](https://discord.com/channels/601130461678272522/614593951969574961/1266503282554179604)
by `@warp` on Discord.

The IR compiler was not properly setting redirect modes for
subexpressions because `FullCellPath` was always being compiled with
capture-out redirection. This is the correct behavior if there is a tail
to the `FullCellPath`, as we need the value in order to try to extract
anything from it (although this is unlikely to work) - however, the
parser also generates `FullCellPath`s with an empty tail quite often,
including for bare subexpressions.

Because of this, the following did not behave as expected:

```nushell
(docker run -it --rm alpine)
```

Capturing the output meant that `docker` didn't have direct access to
the terminal as a TTY.

As this is a minor bug fix, it should be okay to include in the 0.96.1
patch release.

# User-Facing Changes

- Fixes the bug as described when running with IR evaluation enabled.

# Tests + Formatting

I added a test for this, though we're not currently running all tests
with IR on the CI, but it should ensure this behaviour is consistent.
The equivalent minimum repro I could find was:

```nushell
(nu --testbin cococo); null
```

as this should cause the `cococo` message to appear on stdout, and if
Nushell is capturing the output, it would be discarded instead.
2024-07-27 19:38:57 -07:00
..
nu_plugin_custom_values Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu_plugin_example Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu_plugin_formats Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu_plugin_gstat Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu_plugin_inc Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu_plugin_nu_example Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu_plugin_polars Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu_plugin_python Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu_plugin_query Update query-web example to use new chunks (#13429) 2024-07-25 22:01:46 +02:00
nu_plugin_stress_internals Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-cli Fix keybindings list being empty by default (#13456) 2024-07-26 16:03:05 +08:00
nu-cmd-base Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-cmd-extra Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-cmd-lang Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-cmd-plugin Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-color-config Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-command Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-derive-value Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-engine IR: fix incorrect capturing of subexpressions (#13467) 2024-07-27 19:38:57 -07:00
nu-explore Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-glob Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-json Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-lsp Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-parser Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-path Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-plugin Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-plugin-core Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-plugin-engine Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-plugin-protocol Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-plugin-test-support Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-pretty-hex Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-protocol Fix $in in range expressions (#13447) 2024-07-25 18:28:44 +08:00
nu-std Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-system Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-table Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-term-grid Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-test-support Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nu-utils Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
nuon Bump version to 0.96.1 (#13439) 2024-07-25 18:28:18 +08:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.