diff --git a/Cargo.lock b/Cargo.lock index cf0b7954..f8afa238 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -350,11 +350,6 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -<<<<<<< HEAD -version = "0.2.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a5ac8f984bfcf3a823267e5fde638acc3325f6496633a5da6bb6eb2171e103" -======= version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" @@ -368,7 +363,6 @@ dependencies = [ "serde", "serde_test", ] ->>>>>>> 3567bbbf32302dbc3cbf97a39b03efa3bd3e8bb5 [[package]] name = "lock_api" @@ -405,9 +399,9 @@ dependencies = [ [[package]] name = "miette" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b98aebb9d23c72cb22c089834ea59be059c6f462e844fd9fd18dd0168ad149c" +checksum = "4786c5b04c6f73e96d88444e7f37e241d99479ea5dd88a4887363ab2e03b4e53" dependencies = [ "atty", "backtrace", @@ -424,9 +418,9 @@ dependencies = [ [[package]] name = "miette-derive" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a7cd3347eb52480d4ba59d71ce2b48b8b128034e17068c7e2ff3766c2e87a3" +checksum = "0ee63a981bc9cde5f26665ffd756b624963bf0b5956e0df51e52ef8f6b5466d6" dependencies = [ "proc-macro2", "quote", @@ -504,11 +498,7 @@ version = "0.1.0" dependencies = [ "glob", "nu-engine", -<<<<<<< HEAD - "nu-parser", -======= "nu-json", ->>>>>>> 3567bbbf32302dbc3cbf97a39b03efa3bd3e8bb5 "nu-protocol", "nu-table", "sysinfo", @@ -812,7 +802,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.2.0" -source = "git+https://github.com/jntrnr/reedline?branch=main#93c2146fcf4257c40426bc2f0c6903d4115caaf1" +source = "git+https://github.com/jntrnr/reedline?branch=main#bfddc5870ca2d8301694b4211bdcdb29e647c6f3" dependencies = [ "chrono", "crossterm", @@ -944,9 +934,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] name = "smawk" @@ -956,9 +946,9 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "supports-color" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f5b0f9e689dd52e27228469dd68b7416b60d75b7571ae9060a5f4c50048fee" +checksum = "3f3cef55878ee693bb9f6765515f52910ec20b776d222fce5d11fbb9f5368028" dependencies = [ "atty", "is_ci", @@ -975,9 +965,9 @@ dependencies = [ [[package]] name = "supports-unicode" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5fa283a620b255940913bd962cda2e6320e3799041f96ac0d7191ff2b4622f" +checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" dependencies = [ "atty", ] diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml index beca24e6..eb8e8303 100644 --- a/crates/nu-command/Cargo.toml +++ b/crates/nu-command/Cargo.toml @@ -9,14 +9,9 @@ edition = "2018" nu-engine = { path = "../nu-engine" } nu-json = { path = "../nu-json" } nu-protocol = { path = "../nu-protocol" } -<<<<<<< HEAD -nu-engine = { path = "../nu-engine" } -nu-parser = {path = "../nu-parser"} -======= nu-table = { path = "../nu-table" } # Potential dependencies for extras glob = "0.3.0" thiserror = "1.0.29" sysinfo = "0.20.4" ->>>>>>> 3567bbbf32302dbc3cbf97a39b03efa3bd3e8bb5 diff --git a/crates/nu-command/src/core_commands/mod.rs b/crates/nu-command/src/core_commands/mod.rs index 4d909467..43a5165f 100644 --- a/crates/nu-command/src/core_commands/mod.rs +++ b/crates/nu-command/src/core_commands/mod.rs @@ -5,6 +5,7 @@ mod help; mod if_; mod let_; mod module; +mod source; mod use_; pub use alias::Alias; @@ -14,4 +15,5 @@ pub use help::Help; pub use if_::If; pub use let_::Let; pub use module::Module; +pub use source::Source; pub use use_::Use; diff --git a/crates/nu-command/src/source.rs b/crates/nu-command/src/core_commands/source.rs similarity index 91% rename from crates/nu-command/src/source.rs rename to crates/nu-command/src/core_commands/source.rs index 566c898e..677c6f5e 100644 --- a/crates/nu-command/src/source.rs +++ b/crates/nu-command/src/core_commands/source.rs @@ -1,10 +1,6 @@ -use nu_engine::{eval_block, eval_expression}; -use nu_parser::parse; -use nu_protocol::ast::{Block, Call}; -use nu_protocol::engine::{Command, EngineState, EvaluationContext, StateWorkingSet}; -use nu_protocol::{ShellError, Signature, SyntaxShape, Value}; -use std::task::Context; -use std::{borrow::Cow, path::Path, path::PathBuf}; +use nu_protocol::ast::Call; +use nu_protocol::engine::{Command, EvaluationContext}; +use nu_protocol::{Signature, SyntaxShape, Value}; /// Source a file for environment variables. pub struct Source; diff --git a/crates/nu-command/src/default_context.rs b/crates/nu-command/src/default_context.rs index d2041573..6bc8726a 100644 --- a/crates/nu-command/src/default_context.rs +++ b/crates/nu-command/src/default_context.rs @@ -5,14 +5,11 @@ use nu_protocol::{ Signature, }; -<<<<<<< HEAD -use crate::{Alias, Benchmark, BuildString, Def, Do, Each, For, If, Length, Let, LetEnv, Source}; -======= use crate::{ Alias, Benchmark, BuildString, Def, Do, Each, External, For, From, FromJson, Git, GitCheckout, - Help, If, Length, Let, LetEnv, Lines, ListGitBranches, Ls, Module, Ps, Sys, Table, Use, Where, + Help, If, Length, Let, LetEnv, Lines, ListGitBranches, Ls, Module, Ps, Source, Sys, Table, Use, + Where, }; ->>>>>>> 3567bbbf32302dbc3cbf97a39b03efa3bd3e8bb5 pub fn create_default_context() -> Rc> { let engine_state = Rc::new(RefCell::new(EngineState::new())); diff --git a/crates/nu-command/src/lib.rs b/crates/nu-command/src/lib.rs index 35b71cfd..da1fd1a6 100644 --- a/crates/nu-command/src/lib.rs +++ b/crates/nu-command/src/lib.rs @@ -1,29 +1,5 @@ mod core_commands; mod default_context; -<<<<<<< HEAD -mod do_; -mod each; -mod for_; -mod if_; -mod length; -mod let_; -mod let_env; -mod source; - -pub use alias::Alias; -pub use benchmark::Benchmark; -pub use build_string::BuildString; -pub use def::Def; -pub use default_context::create_default_context; -pub use do_::Do; -pub use each::Each; -pub use for_::For; -pub use if_::If; -pub use length::Length; -pub use let_::Let; -pub use let_env::LetEnv; -pub use source::Source; -======= mod env; mod experimental; mod filesystem; @@ -43,4 +19,3 @@ pub use formats::*; pub use strings::*; pub use system::*; pub use viewers::*; ->>>>>>> 3567bbbf32302dbc3cbf97a39b03efa3bd3e8bb5 diff --git a/crates/nu-engine/src/eval.rs b/crates/nu-engine/src/eval.rs index 0abb4efb..f8b7c633 100644 --- a/crates/nu-engine/src/eval.rs +++ b/crates/nu-engine/src/eval.rs @@ -1,12 +1,7 @@ use nu_parser::parse; use nu_protocol::ast::{Block, Call, Expr, Expression, Operator, Statement}; -<<<<<<< HEAD -use nu_protocol::engine::{EngineState, EvaluationContext, StateWorkingSet}; -use nu_protocol::{Range, ShellError, Span, Value}; -======= use nu_protocol::engine::EvaluationContext; use nu_protocol::{Range, ShellError, Span, Type, Value}; ->>>>>>> 3567bbbf32302dbc3cbf97a39b03efa3bd3e8bb5 pub fn eval_operator(op: &Expression) -> Result { match op {