From 6f5391265570a49468a823680b27be5966a8fcdf Mon Sep 17 00:00:00 2001 From: Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> Date: Mon, 13 Dec 2021 04:42:04 +0900 Subject: [PATCH] Fix: add missing bind commands (#477) * chore(random): update naming convention * fix: add missing bind commands --- crates/nu-command/src/default_context.rs | 15 +++++++++++++++ crates/nu-command/src/random/mod.rs | 12 ++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/crates/nu-command/src/default_context.rs b/crates/nu-command/src/default_context.rs index 2fa6483d2..7c3d79a01 100644 --- a/crates/nu-command/src/default_context.rs +++ b/crates/nu-command/src/default_context.rs @@ -227,9 +227,24 @@ pub fn create_default_context() -> EngineState { MathVariance, }; + // Network + bind_command! { + Url, + UrlHost, + UrlPath, + UrlQuery, + UrlScheme, + } + // Random bind_command! { Random, + RandomBool, + RandomChars, + RandomDecimal, + RandomDice, + RandomInteger, + RandomUuid, }; // Generators diff --git a/crates/nu-command/src/random/mod.rs b/crates/nu-command/src/random/mod.rs index 0e36df2d7..e395e8f09 100644 --- a/crates/nu-command/src/random/mod.rs +++ b/crates/nu-command/src/random/mod.rs @@ -6,10 +6,10 @@ mod dice; mod integer; mod uuid; -pub use self::bool::SubCommand as Bool; -pub use self::chars::SubCommand as Chars; -pub use self::decimal::SubCommand as Decimal; -pub use self::dice::SubCommand as Dice; -pub use self::integer::SubCommand as Integer; -pub use self::uuid::SubCommand as Uuid; +pub use self::bool::SubCommand as RandomBool; +pub use self::chars::SubCommand as RandomChars; +pub use self::decimal::SubCommand as RandomDecimal; +pub use self::dice::SubCommand as RandomDice; +pub use self::integer::SubCommand as RandomInteger; +pub use self::uuid::SubCommand as RandomUuid; pub use command::RandomCommand as Random;