nushell/crates/nu-cli/src
Raphael Gaschignard d8f13b36b1
Allow for stacks to have parents (#11654)
This is another attempt on #11288 

This allows for a `Stack` to have a parent stack (behind an `Arc`). This
is being added to avoid constant stack copying in REPL code.

Concretely the following changes are included here:
- `Stack` can now have a `parent_stack`, pointing to another stack
- variable lookups can fallback to this parent stack (env vars and
everything else is still copied)
- REPL code has been reworked so that we use parenting rather than
cloning. A REPL-code-specific trait helps to ensure that we do not
accidentally trigger a full clone of the main stack
- A property test has been added to make sure that parenting "looks the
same" as cloning for consumers of `Stack` objects

---------

Co-authored-by: Raphael Gaschignard <rtpg@rokkenjima.local>
Co-authored-by: Ian Manske <ian.manske@pm.me>
2024-03-09 17:55:39 +01:00
..
commands Add ConfigDirNotFound error (#11849) 2024-02-26 15:42:20 +08:00
completions Debugger experiments (#11441) 2024-03-08 20:21:35 +02:00
menus Debugger experiments (#11441) 2024-03-08 20:21:35 +02:00
config_files.rs Canonicalize default-config-dir and plugin-path (#11999) 2024-03-02 11:15:31 -06:00
eval_cmds.rs Debugger experiments (#11441) 2024-03-08 20:21:35 +02:00
eval_file.rs Debugger experiments (#11441) 2024-03-08 20:21:35 +02:00
lib.rs Bump Reedline for the Menu Refactor (#11658) 2024-01-28 08:26:03 -08:00
nu_highlight.rs Allow for stacks to have parents (#11654) 2024-03-09 17:55:39 +01:00
print.rs Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
prompt_update.rs Allow for stacks to have parents (#11654) 2024-03-09 17:55:39 +01:00
prompt.rs fix shell integration markers (#11352) 2023-12-16 20:12:34 -06:00
reedline_config.rs Debugger experiments (#11441) 2024-03-08 20:21:35 +02:00
repl.rs Allow for stacks to have parents (#11654) 2024-03-09 17:55:39 +01:00
syntax_highlight.rs Support redirect stderr and stdout+stderr with a pipe (#11708) 2024-02-09 01:30:46 +08:00
util.rs Debugger experiments (#11441) 2024-03-08 20:21:35 +02:00
validation.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00