nushell/crates/nu-cli/src
Ian Manske bae6d694ca
Refactor using ClosureEval types (#12541)
# Description
Adds two new types in `nu-engine` for evaluating closures: `ClosureEval`
and `ClosureEvalOnce`. This removed some duplicate code and centralizes
our logic for setting up, running, and cleaning up closures. For
example, in the future if we are able to reduce the cloning necessary to
run a closure, then we only have to change the code related to these
types.

`ClosureEval` and `ClosureEvalOnce` are designed with a builder API.
`ClosureEval` is used to run a closure multiple times whereas
`ClosureEvalOnce` is used for a one-shot closure.

# User-Facing Changes
Should be none, unless I messed up one of the command migrations.
Actually, this will fix any unreported environment bugs for commands
that didn't reset the env after running a closure.
2024-04-22 14:15:09 +08:00
..
commands fix simple typo in commandline_.rs (#12387) 2024-04-04 09:59:52 +02:00
completions Remove the Value::Block case (#12582) 2024-04-21 07:03:33 +02:00
menus Rename IoStream to OutDest (#12433) 2024-04-09 16:48:32 +00:00
config_files.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
eval_cmds.rs Add --no-newline option to nu (#12410) 2024-04-09 10:04:00 -04:00
eval_file.rs Fix circular source causing Nushell to crash (#12262) 2024-04-19 09:38:08 +03: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 using ClosureEval types (#12541) 2024-04-22 14:15:09 +08:00
prompt.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
reedline_config.rs add a few more logging statements for debugging startup (#12316) 2024-03-28 11:27:12 -05:00
repl.rs fix(shell_integration): set window title on startup (#12569) 2024-04-18 20:30:37 -05:00
syntax_highlight.rs Add ListItem type for Expr::List (#12529) 2024-04-18 13:21:05 +02:00
util.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
validation.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00