Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split nu-cli into nu-cli/nu-engine #2898

Merged
merged 8 commits into from
Jan 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
sophiajt committed Jan 10, 2021
commit 56c82c73f7c1cd5fcfb6d42ccb925edc3d6237bc
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/ansi.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use ansi_term::Color;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/autoenv.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};
use serde::Deserialize;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/autoenv_trust.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::autoenv::read_trusted;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::SyntaxShape;
use nu_protocol::{Primitive, ReturnSuccess, Signature, UntaggedValue, Value};
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/autoenv_untrust.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::autoenv::Trusted;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::SyntaxShape;
use nu_protocol::{Primitive, ReturnSuccess, Signature, UntaggedValue, Value};
Expand Down
4 changes: 2 additions & 2 deletions crates/nu-cli/src/commands/benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use nu_engine::run_block;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
#[cfg(feature = "rich-benchmark")]
use heim::cpu::time;
use nu_engine::run_block;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{
hir::{Block, CapturedBlock, ClassifiedCommand, Group, InternalCommand, Pipeline},
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/build_string.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::prelude::*;
use nu_errors::ShellError;

use nu_engine::WholeStreamCommand;
use nu_data::value::format_leaf;
use nu_engine::WholeStreamCommand;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};

#[derive(Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/char_.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/chart.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/clear.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::Signature;
use std::process::Command;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/clip.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use futures::stream::StreamExt;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Signature, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/compact.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use futures::future;
use futures::stream::StreamExt;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/config/clear.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/config/get.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ColumnPath, ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/config/load.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/config/path.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Primitive, ReturnSuccess, Signature, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/config/remove.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/config/set.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ColumnPath, ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/config/set_into.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/count.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use futures::stream::StreamExt;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Signature, UntaggedValue, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/date/command.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/date/format.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{
Dictionary, Primitive, ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value,
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/date/list_timezone.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use chrono_tz::TZ_VARIANTS;
use indexmap::IndexMap;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Dictionary, ReturnSuccess, Signature, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/date/now.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use chrono::{DateTime, Local};
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Signature, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/date/to_table.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use chrono::{Datelike, Timelike};
use indexmap::IndexMap;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Dictionary, Primitive, ReturnSuccess, Signature, UntaggedValue, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/date/to_timezone.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::commands::date::parser::{datetime_in_timezone, ParseErrorKind};
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Primitive, ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/debug.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/def.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;

use nu_errors::ShellError;
use nu_protocol::{hir::CapturedBlock, Signature, SyntaxShape, Value};
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/default.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/describe.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;

use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/do_.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::prelude::*;
use nu_engine::run_block;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_errors::ShellError;
use nu_protocol::{hir::CapturedBlock, hir::ExternalRedirection, Signature, SyntaxShape, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/drop.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Signature, SyntaxShape, UntaggedValue};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/each/command.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::prelude::*;
use nu_engine::run_block;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;

use futures::stream::once;
use nu_errors::ShellError;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/each/group.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::commands::each::process_row;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{
hir::CapturedBlock, ReturnSuccess, Signature, SyntaxShape, UntaggedValue, Value,
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/each/window.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::commands::each::group::run_block_on_vec;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
//use itertools::Itertools;
use nu_errors::ShellError;
use nu_protocol::{hir::CapturedBlock, Primitive, Signature, SyntaxShape, UntaggedValue};
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/echo.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::hir::Operator;
use nu_protocol::{
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/empty.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::prelude::*;
use nu_engine::run_block;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_errors::ShellError;
use nu_protocol::{
hir::CapturedBlock, ColumnPath, Primitive, ReturnSuccess, Signature, SyntaxShape,
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/every.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, SyntaxShape, UntaggedValue};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/exec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Signature, SyntaxShape};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/first.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Signature, SyntaxShape, UntaggedValue};
use nu_source::Tagged;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/flatten.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{
Dictionary, ReturnSuccess, Signature, SyntaxShape, TaggedDictBuilder, UntaggedValue, Value,
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_csv.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::commands::from_delimited_data::from_delimited_data;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Primitive, Signature, SyntaxShape, UntaggedValue, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_ini.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Primitive, Signature, TaggedDictBuilder, UntaggedValue, Value};
use std::collections::HashMap;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_json.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Primitive, ReturnSuccess, Signature, TaggedDictBuilder, UntaggedValue, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_ods.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use calamine::*;
use nu_data::TaggedListBuilder;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, TaggedDictBuilder, UntaggedValue};
use std::io::Cursor;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_ssv.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{
Primitive, ReturnSuccess, Signature, SyntaxShape, TaggedDictBuilder, UntaggedValue, Value,
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_toml.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Primitive, ReturnSuccess, Signature, TaggedDictBuilder, UntaggedValue, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_tsv.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::commands::from_delimited_data::from_delimited_data;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::Signature;

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_url.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, TaggedDictBuilder, UntaggedValue};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_vcf.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
extern crate ical;
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use ical::parser::vcard::component::*;
use ical::property::Property;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Primitive, ReturnSuccess, Signature, TaggedDictBuilder, UntaggedValue, Value};

Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_xlsx.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use calamine::*;
use nu_data::TaggedListBuilder;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{ReturnSuccess, Signature, TaggedDictBuilder, UntaggedValue};
use std::io::Cursor;
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cli/src/commands/from_xml.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use nu_engine::WholeStreamCommand;
use crate::prelude::*;
use nu_engine::WholeStreamCommand;
use nu_errors::ShellError;
use nu_protocol::{Primitive, ReturnSuccess, Signature, TaggedDictBuilder, UntaggedValue, Value};

Expand Down
Loading