diff --git a/crates/nu-cmd-extra/src/extra/mod.rs b/crates/nu-cmd-extra/src/extra/mod.rs index 2f65f92924..c8d189a930 100644 --- a/crates/nu-cmd-extra/src/extra/mod.rs +++ b/crates/nu-cmd-extra/src/extra/mod.rs @@ -1,5 +1,4 @@ mod bits; -mod bytes; mod conversions; mod filters; mod formats; @@ -7,19 +6,6 @@ mod math; mod platform; mod strings; -pub use bytes::Bytes; -pub use bytes::BytesAdd; -pub use bytes::BytesAt; -pub use bytes::BytesBuild; -pub use bytes::BytesCollect; -pub use bytes::BytesEndsWith; -pub use bytes::BytesIndexOf; -pub use bytes::BytesLen; -pub use bytes::BytesRemove; -pub use bytes::BytesReplace; -pub use bytes::BytesReverse; -pub use bytes::BytesStartsWith; - pub use bits::Bits; pub use bits::BitsAnd; pub use bits::BitsInto; @@ -111,22 +97,6 @@ pub fn add_extra_command_context(mut engine_state: EngineState) -> EngineState { BitsXor } - // Bytes - bind_command! { - Bytes, - BytesLen, - BytesStartsWith, - BytesEndsWith, - BytesReverse, - BytesReplace, - BytesAdd, - BytesAt, - BytesIndexOf, - BytesCollect, - BytesRemove, - BytesBuild - } - // Math bind_command! { MathArcSin, diff --git a/crates/nu-cmd-extra/src/extra/bytes/add.rs b/crates/nu-command/src/bytes/add.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/add.rs rename to crates/nu-command/src/bytes/add.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/at.rs b/crates/nu-command/src/bytes/at.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/at.rs rename to crates/nu-command/src/bytes/at.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/build_.rs b/crates/nu-command/src/bytes/build_.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/build_.rs rename to crates/nu-command/src/bytes/build_.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/bytes_.rs b/crates/nu-command/src/bytes/bytes_.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/bytes_.rs rename to crates/nu-command/src/bytes/bytes_.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/collect.rs b/crates/nu-command/src/bytes/collect.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/collect.rs rename to crates/nu-command/src/bytes/collect.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/ends_with.rs b/crates/nu-command/src/bytes/ends_with.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/ends_with.rs rename to crates/nu-command/src/bytes/ends_with.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/index_of.rs b/crates/nu-command/src/bytes/index_of.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/index_of.rs rename to crates/nu-command/src/bytes/index_of.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/length.rs b/crates/nu-command/src/bytes/length.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/length.rs rename to crates/nu-command/src/bytes/length.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/mod.rs b/crates/nu-command/src/bytes/mod.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/mod.rs rename to crates/nu-command/src/bytes/mod.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/remove.rs b/crates/nu-command/src/bytes/remove.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/remove.rs rename to crates/nu-command/src/bytes/remove.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/replace.rs b/crates/nu-command/src/bytes/replace.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/replace.rs rename to crates/nu-command/src/bytes/replace.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/reverse.rs b/crates/nu-command/src/bytes/reverse.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/reverse.rs rename to crates/nu-command/src/bytes/reverse.rs diff --git a/crates/nu-cmd-extra/src/extra/bytes/starts_with.rs b/crates/nu-command/src/bytes/starts_with.rs similarity index 100% rename from crates/nu-cmd-extra/src/extra/bytes/starts_with.rs rename to crates/nu-command/src/bytes/starts_with.rs diff --git a/crates/nu-command/src/default_context.rs b/crates/nu-command/src/default_context.rs index a3422179a9..a8c23bd17d 100644 --- a/crates/nu-command/src/default_context.rs +++ b/crates/nu-command/src/default_context.rs @@ -325,6 +325,22 @@ pub fn add_shell_command_context(mut engine_state: EngineState) -> EngineState { MathLog, }; + // Bytes + bind_command! { + Bytes, + BytesLen, + BytesStartsWith, + BytesEndsWith, + BytesReverse, + BytesReplace, + BytesAdd, + BytesAt, + BytesIndexOf, + BytesCollect, + BytesRemove, + BytesBuild + } + // Network bind_command! { Http, diff --git a/crates/nu-command/src/lib.rs b/crates/nu-command/src/lib.rs index f694822fb4..276f359e8d 100644 --- a/crates/nu-command/src/lib.rs +++ b/crates/nu-command/src/lib.rs @@ -1,3 +1,4 @@ +mod bytes; mod charting; mod conversions; mod date; @@ -27,6 +28,7 @@ mod strings; mod system; mod viewers; +pub use bytes::*; pub use charting::*; pub use conversions::*; pub use date::*;