nushell/crates/nu-cli/src
Jakub Žádník a55a48529d
Fix delta not being merged when evaluating menus (#13120)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

After parsing menu code, the changes weren't merged into the engine
state, which didn't produce any errors (somehow?) until the recent span
ID refactors. With this PR, menus get a new cloned engine state with the
parsed changes correctly merged in.

Hopefully fixes https://github.com/nushell/nushell/issues/13118

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the
tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-10 22:33:22 +03:00
..
commands Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
completions Fix the colors when completing using a relative path (#12898) 2024-06-07 08:07:23 -05:00
menus Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
config_files.rs Revert "Remove std::env::set_current_dir() call from EngineState::merge_env()" (#12954) 2024-05-24 11:09:59 -05:00
eval_cmds.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
eval_file.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
lib.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
nu_highlight.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
print.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
prompt_update.rs Refactor the CLI code a bit (#12782) 2024-05-10 07:29:27 +08:00
prompt.rs cleanup osc calls for shell_integration (#12810) 2024-05-08 13:34:04 -05:00
reedline_config.rs Fix delta not being merged when evaluating menus (#13120) 2024-06-10 22:33:22 +03:00
repl.rs fixes a bug in OSC9;9 execution (#12994) 2024-05-29 18:06:47 -05:00
syntax_highlight.rs Avoid taking unnecessary ownership of intermediates (#12740) 2024-05-04 00:53:15 +00:00
util.rs Add string/binary type color to ByteStream (#12897) 2024-05-20 00:35:32 +00:00
validation.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00