diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml index 3b4e5830a6..f843252dae 100644 --- a/crates/nu-command/Cargo.toml +++ b/crates/nu-command/Cargo.toml @@ -75,7 +75,6 @@ regex = "1.7.1" reqwest = { version = "0.11", features = ["blocking", "json"] } roxmltree = "0.18.0" rust-embed = "6.3.0" -rust-ini = "0.18.0" same-file = "1.0.6" serde = { version = "1.0.123", features = ["derive"] } serde_urlencoded = "0.7.0" diff --git a/crates/nu-command/src/core_commands/mod.rs b/crates/nu-command/src/core_commands/mod.rs index 6ed0d3bdb0..520a873b9c 100644 --- a/crates/nu-command/src/core_commands/mod.rs +++ b/crates/nu-command/src/core_commands/mod.rs @@ -4,7 +4,6 @@ mod break_; mod commandline; mod const_; mod continue_; -mod debug; mod def; mod def_env; mod describe; @@ -30,7 +29,6 @@ mod if_; mod ignore; mod let_; mod loop_; -mod metadata; mod module; mod mut_; pub(crate) mod overlay; @@ -46,7 +44,6 @@ pub use break_::Break; pub use commandline::Commandline; pub use const_::Const; pub use continue_::Continue; -pub use debug::Debug; pub use def::Def; pub use def_env::DefEnv; pub use describe::Describe; @@ -72,7 +69,6 @@ pub use if_::If; pub use ignore::Ignore; pub use let_::Let; pub use loop_::Loop; -pub use metadata::Metadata; pub use module::Module; pub use mut_::Mut; pub use overlay::*; diff --git a/crates/nu-command/src/core_commands/debug.rs b/crates/nu-command/src/debug/debug_.rs similarity index 100% rename from crates/nu-command/src/core_commands/debug.rs rename to crates/nu-command/src/debug/debug_.rs diff --git a/crates/nu-command/src/system/explain.rs b/crates/nu-command/src/debug/explain.rs similarity index 100% rename from crates/nu-command/src/system/explain.rs rename to crates/nu-command/src/debug/explain.rs diff --git a/crates/nu-command/src/system/inspect.rs b/crates/nu-command/src/debug/inspect.rs similarity index 100% rename from crates/nu-command/src/system/inspect.rs rename to crates/nu-command/src/debug/inspect.rs diff --git a/crates/nu-command/src/system/inspect_table.rs b/crates/nu-command/src/debug/inspect_table.rs similarity index 99% rename from crates/nu-command/src/system/inspect_table.rs rename to crates/nu-command/src/debug/inspect_table.rs index 36b0ea6604..8a51e18233 100644 --- a/crates/nu-command/src/system/inspect_table.rs +++ b/crates/nu-command/src/debug/inspect_table.rs @@ -118,7 +118,7 @@ mod truncate_table { } mod util { - use crate::system::explain::debug_string_without_formatting; + use crate::debug::explain::debug_string_without_formatting; use nu_engine::get_columns; use nu_protocol::{ast::PathMember, Span, Value}; diff --git a/crates/nu-command/src/core_commands/metadata.rs b/crates/nu-command/src/debug/metadata.rs similarity index 100% rename from crates/nu-command/src/core_commands/metadata.rs rename to crates/nu-command/src/debug/metadata.rs diff --git a/crates/nu-command/src/debug/mod.rs b/crates/nu-command/src/debug/mod.rs new file mode 100644 index 0000000000..d97cfe2483 --- /dev/null +++ b/crates/nu-command/src/debug/mod.rs @@ -0,0 +1,23 @@ +mod debug_; +mod explain; +mod inspect; +mod inspect_table; +mod metadata; +mod profile; +mod timeit; +mod view; +mod view_files; +mod view_source; +mod view_span; + +pub use debug_::Debug; +pub use explain::Explain; +pub use inspect::Inspect; +pub use inspect_table::build_table; +pub use metadata::Metadata; +pub use profile::Profile; +pub use timeit::TimeIt; +pub use view::View; +pub use view_files::ViewFiles; +pub use view_source::ViewSource; +pub use view_span::ViewSpan; diff --git a/crates/nu-command/src/experimental/profile.rs b/crates/nu-command/src/debug/profile.rs similarity index 100% rename from crates/nu-command/src/experimental/profile.rs rename to crates/nu-command/src/debug/profile.rs diff --git a/crates/nu-command/src/system/timeit.rs b/crates/nu-command/src/debug/timeit.rs similarity index 99% rename from crates/nu-command/src/system/timeit.rs rename to crates/nu-command/src/debug/timeit.rs index 0a29f553c7..d9e003693a 100644 --- a/crates/nu-command/src/system/timeit.rs +++ b/crates/nu-command/src/debug/timeit.rs @@ -31,7 +31,7 @@ impl Command for TimeIt { (Type::Nothing, Type::Duration), ]) .allow_variants_without_examples(true) - .category(Category::System) + .category(Category::Debug) } fn search_terms(&self) -> Vec<&str> { diff --git a/crates/nu-command/src/experimental/view.rs b/crates/nu-command/src/debug/view.rs similarity index 100% rename from crates/nu-command/src/experimental/view.rs rename to crates/nu-command/src/debug/view.rs diff --git a/crates/nu-command/src/experimental/view_files.rs b/crates/nu-command/src/debug/view_files.rs similarity index 100% rename from crates/nu-command/src/experimental/view_files.rs rename to crates/nu-command/src/debug/view_files.rs diff --git a/crates/nu-command/src/experimental/view_source.rs b/crates/nu-command/src/debug/view_source.rs similarity index 100% rename from crates/nu-command/src/experimental/view_source.rs rename to crates/nu-command/src/debug/view_source.rs diff --git a/crates/nu-command/src/experimental/view_span.rs b/crates/nu-command/src/debug/view_span.rs similarity index 100% rename from crates/nu-command/src/experimental/view_span.rs rename to crates/nu-command/src/debug/view_span.rs diff --git a/crates/nu-command/src/default_context.rs b/crates/nu-command/src/default_context.rs index 5d042cc355..e0ccc4a520 100644 --- a/crates/nu-command/src/default_context.rs +++ b/crates/nu-command/src/default_context.rs @@ -34,7 +34,6 @@ pub fn create_default_context() -> EngineState { Commandline, Const, Continue, - Debug, Def, DefEnv, Describe, @@ -65,7 +64,6 @@ pub fn create_default_context() -> EngineState { OverlayHide, Let, Loop, - Metadata, Module, Mut, Return, @@ -173,12 +171,23 @@ pub fn create_default_context() -> EngineState { // System bind_command! { Complete, - Explain, External, - Inspect, NuCheck, Sys, + }; + + // Debug + bind_command! { + Debug, + Explain, + Inspect, + Metadata, + Profile, TimeIt, + View, + ViewFiles, + ViewSource, + ViewSpan, }; #[cfg(unix)] @@ -471,11 +480,6 @@ pub fn create_default_context() -> EngineState { // Experimental bind_command! { IsAdmin, - Profile, - View, - ViewFiles, - ViewSource, - ViewSpan, }; // Deprecated diff --git a/crates/nu-command/src/experimental/mod.rs b/crates/nu-command/src/experimental/mod.rs index 54b38f1437..75328181a8 100644 --- a/crates/nu-command/src/experimental/mod.rs +++ b/crates/nu-command/src/experimental/mod.rs @@ -1,13 +1,3 @@ mod is_admin; -mod profile; -mod view; -mod view_files; -mod view_source; -mod view_span; pub use is_admin::IsAdmin; -pub use profile::Profile; -pub use view::View; -pub use view_files::ViewFiles; -pub use view_source::ViewSource; -pub use view_span::ViewSpan; diff --git a/crates/nu-command/src/lib.rs b/crates/nu-command/src/lib.rs index ea3c8e8a99..3c72e0853c 100644 --- a/crates/nu-command/src/lib.rs +++ b/crates/nu-command/src/lib.rs @@ -4,6 +4,7 @@ mod charting; mod conversions; mod core_commands; mod date; +mod debug; mod default_context; mod deprecated; mod env; @@ -34,6 +35,7 @@ pub use charting::*; pub use conversions::*; pub use core_commands::*; pub use date::*; +pub use debug::*; pub use default_context::*; pub use deprecated::*; pub use env::*; diff --git a/crates/nu-command/src/system/mod.rs b/crates/nu-command/src/system/mod.rs index 41a5402ee6..12ece2d93b 100644 --- a/crates/nu-command/src/system/mod.rs +++ b/crates/nu-command/src/system/mod.rs @@ -1,9 +1,6 @@ mod complete; #[cfg(unix)] mod exec; -mod explain; -mod inspect; -mod inspect_table; mod nu_check; #[cfg(any( target_os = "android", @@ -16,15 +13,11 @@ mod ps; mod registry_query; mod run_external; mod sys; -mod timeit; mod which_; pub use complete::Complete; #[cfg(unix)] pub use exec::Exec; -pub use explain::Explain; -pub use inspect::Inspect; -pub use inspect_table::build_table; pub use nu_check::NuCheck; #[cfg(any( target_os = "android", @@ -37,5 +30,4 @@ pub use ps::Ps; pub use registry_query::RegistryQuery; pub use run_external::{External, ExternalCommand}; pub use sys::Sys; -pub use timeit::TimeIt; pub use which_::Which;