nushell/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
..
tests Fix: lex now throws error on unbalanced closing parentheses (issue #11982) (#12098) 2024-03-07 06:05:04 -06:00
command.rs wrapping run_repl with catch_unwind and restarting the repl on panic (#11860) 2024-02-22 12:14:10 -06:00
config_files.rs Handle configuration panics (#11935) 2024-02-22 16:25:55 -06:00
ide.rs Make only_buffer_difference: true work (#11488) 2024-01-11 11:58:14 -06:00
logger.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
main.rs wrapping run_repl with catch_unwind and restarting the repl on panic (#11860) 2024-02-22 12:14:10 -06:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
run.rs Allow for stacks to have parents (#11654) 2024-03-09 17:55:39 +01:00
signals.rs Simplify SIGQUIT handling (#11381) 2023-12-21 17:00:38 +01:00
terminal.rs Do not block signals for child processes (#11402) 2024-01-15 16:08:21 -06:00
test_bins.rs Debugger experiments (#11441) 2024-03-08 20:21:35 +02:00
tests.rs Spread operator for list literals (#11006) 2023-11-22 23:10:08 +02:00

Nushell REPL

This directory contains the main Nushell REPL (read eval print loop) as part of the CLI portion of Nushell, which creates the nu binary itself.

Current versions of the nu binary will use the Nu argument parsing logic to parse the commandline arguments passed to nu, leaving the logic here to be a thin layer around what the core libraries.