mirror of
https://github.com/nushell/nushell.git
synced 2024-12-27 17:39:15 +01:00
d8f13b36b1
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> |
||
---|---|---|
.. | ||
tests | ||
command.rs | ||
config_files.rs | ||
ide.rs | ||
logger.rs | ||
main.rs | ||
README.md | ||
run.rs | ||
signals.rs | ||
terminal.rs | ||
test_bins.rs | ||
tests.rs |
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.