forked from extern/nushell
Move eval_hook
to nu-cmd-base
(#10146)
I moved hook to *nu_cmd_base* instead of *nu_cli* because it will enable other developers to continue to use hook even if they decide to write their on cli or NOT depend on nu-cli Then they will still have the hook functionality because they can include nu-cmd-base
This commit is contained in:
@@ -12,12 +12,12 @@ bench = false
|
||||
|
||||
[dev-dependencies]
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.84.1" }
|
||||
nu-command = { path = "../nu-command", version = "0.84.1" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.84.1" }
|
||||
rstest = { version = "0.18.1", default-features = false }
|
||||
|
||||
[dependencies]
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.84.1" }
|
||||
nu-command = { path = "../nu-command", version = "0.84.1" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.84.1" }
|
||||
nu-path = { path = "../nu-path", version = "0.84.1" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.84.1" }
|
||||
|
@@ -8,9 +8,9 @@ use crate::{
|
||||
use crossterm::cursor::SetCursorStyle;
|
||||
use log::{trace, warn};
|
||||
use miette::{ErrReport, IntoDiagnostic, Result};
|
||||
use nu_cmd_base::hook::eval_hook;
|
||||
use nu_cmd_base::util::get_guaranteed_cwd;
|
||||
use nu_color_config::StyleComputer;
|
||||
use nu_command::hook::eval_hook;
|
||||
use nu_engine::convert_env_values;
|
||||
use nu_parser::{lex, parse, trim_quotes_str};
|
||||
use nu_protocol::{
|
||||
@@ -50,7 +50,7 @@ pub fn evaluate_repl(
|
||||
load_std_lib: Option<Spanned<String>>,
|
||||
entire_start_time: Instant,
|
||||
) -> Result<()> {
|
||||
use nu_command::hook;
|
||||
use nu_cmd_base::hook;
|
||||
use reedline::Signal;
|
||||
let use_color = engine_state.get_config().use_ansi_coloring;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
use nu_command::hook::eval_hook;
|
||||
use nu_cmd_base::hook::eval_hook;
|
||||
use nu_engine::{eval_block, eval_block_with_early_return};
|
||||
use nu_parser::{escape_quote_string, lex, parse, unescape_unquote_string, Token, TokenContents};
|
||||
use nu_protocol::engine::StateWorkingSet;
|
||||
|
Reference in New Issue
Block a user