Update command groups with new and deprecated commands

main
trivernis 1 year ago
parent 667d672dc5
commit 9f259878dd
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: DFFFCC2C7A02DB45

@ -10,11 +10,12 @@ authors = ["trivernis <trivernis@proton.me>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
miette = "5.5.0"
nu-command = "0.75.0"
nu-engine = "0.75.0"
nu-parser = "0.75.0"
nu-protocol = "0.75.0"
paste = "1.0.11"
miette = "5.7.0"
nu-cmd-lang = "0.78.0"
nu-command = "0.78.0"
nu-engine = "0.78.0"
nu-parser = "0.78.0"
nu-protocol = "0.78.0"
paste = "1.0.12"
rusty-value = { version = "0.6.0", features = ["derive"] }
thiserror = "1.0.38"
thiserror = "1.0.40"

@ -1,3 +1,4 @@
use nu_cmd_lang::*;
use nu_command::*;
use nu_protocol::engine::{EngineState, StateWorkingSet};
@ -14,12 +15,13 @@ macro_rules! bind_commands {
pub fn bind_core_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands!(
engine_state,
Metadata,
Alias,
Ast,
Break,
Collect,
Commandline,
Const,
Continue,
Debug,
Def,
DefEnv,
Describe,
@ -35,6 +37,10 @@ pub fn bind_core_commands(engine_state: &mut EngineState) -> CrateResult<()> {
Extern,
For,
Help,
HelpAliases,
HelpCommands,
HelpModules,
HelpExterns,
HelpOperators,
Hide,
HideEnv,
@ -46,7 +52,8 @@ pub fn bind_core_commands(engine_state: &mut EngineState) -> CrateResult<()> {
OverlayNew,
OverlayHide,
Let,
Metadata,
Loop,
Match,
Module,
Mut,
Return,
@ -57,6 +64,23 @@ pub fn bind_core_commands(engine_state: &mut EngineState) -> CrateResult<()> {
)
}
pub fn bind_debug_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands!(
engine_state,
Ast,
Debug,
Explain,
Inspect,
Metadata,
Profile,
TimeIt,
View,
ViewFiles,
ViewSource,
ViewSpan,
)
}
pub fn bind_chart_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands!(engine_state, Histogram)
}
@ -67,7 +91,6 @@ pub fn bind_filter_commands(engine_state: &mut EngineState) -> CrateResult<()> {
All,
Any,
Append,
Collect,
Columns,
Compact,
Default,
@ -77,7 +100,9 @@ pub fn bind_filter_commands(engine_state: &mut EngineState) -> CrateResult<()> {
Each,
EachWhile,
Empty,
Enumerate,
Every,
Filter,
Find,
First,
Flatten,
@ -86,6 +111,7 @@ pub fn bind_filter_commands(engine_state: &mut EngineState) -> CrateResult<()> {
GroupBy,
Headers,
Insert,
Join,
SplitBy,
Take,
Merge,
@ -118,13 +144,16 @@ pub fn bind_filter_commands(engine_state: &mut EngineState) -> CrateResult<()> {
SplitList,
Transpose,
Uniq,
UniqBy,
Upsert,
Update,
UpdateCells,
Values,
Where,
Window,
Wrap,
Zip, }
Zip,
}
}
pub fn bind_misc_commands(engine_state: &mut EngineState) -> CrateResult<()> {
@ -151,7 +180,6 @@ pub fn bind_path_commands(engine_state: &mut EngineState) -> CrateResult<()> {
pub fn bind_system_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands! {
engine_state,
Benchmark,
Complete,
External,
NuCheck,
@ -166,7 +194,6 @@ pub fn bind_system_commands(engine_state: &mut EngineState) -> CrateResult<()> {
pub fn bind_system_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands! {
engine_state,
Benchmark,
Complete,
External,
NuCheck,
@ -181,7 +208,6 @@ pub fn bind_system_commands(engine_state: &mut EngineState) -> CrateResult<()> {
pub fn bind_system_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands! {
engine_state,
Benchmark,
Complete,
External,
NuCheck,
@ -199,6 +225,8 @@ pub fn bind_string_commands(engine_state: &mut EngineState) -> CrateResult<()> {
Encode,
DecodeBase64,
EncodeBase64,
DecodeHex,
EncodeHex,
DetectColumns,
Format,
FileSize,
@ -212,7 +240,6 @@ pub fn bind_string_commands(engine_state: &mut EngineState) -> CrateResult<()> {
Str,
StrCamelCase,
StrCapitalize,
StrCollect,
StrContains,
StrDistance,
StrDowncase,
@ -222,17 +249,15 @@ pub fn bind_string_commands(engine_state: &mut EngineState) -> CrateResult<()> {
StrIndexOf,
StrKebabCase,
StrLength,
StrLpad,
StrPascalCase,
StrReverse,
StrRpad,
StrScreamingSnakeCase,
StrSnakeCase,
StrStartsWith,
StrSubstring,
StrTrim,
StrTitleCase,
StrUpcase,
StrUpcase
}
}
@ -336,9 +361,6 @@ pub fn bind_format_commands(engine_state: &mut EngineState) -> CrateResult<()> {
engine_state,
From,
FromCsv,
FromEml,
FromIcs,
FromIni,
FromJson,
FromNuon,
FromOds,
@ -346,7 +368,6 @@ pub fn bind_format_commands(engine_state: &mut EngineState) -> CrateResult<()> {
FromToml,
FromTsv,
FromUrl,
FromVcf,
FromXlsx,
FromXml,
FromYaml,
@ -361,7 +382,6 @@ pub fn bind_format_commands(engine_state: &mut EngineState) -> CrateResult<()> {
ToToml,
ToTsv,
Touch,
Use,
Upsert,
Where,
ToXml,
@ -374,12 +394,14 @@ pub fn bind_viewer_commands(engine_state: &mut EngineState) -> CrateResult<()> {
engine_state,
Griddle,
Table,
Explore,
}
}
pub fn bind_conversion_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands! {
engine_state,
Fill,
Fmt,
Into,
IntoBool,
@ -397,7 +419,6 @@ pub fn bind_conversion_commands(engine_state: &mut EngineState) -> CrateResult<(
pub fn bind_environment_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands! {
engine_state,
Env,
ExportEnv,
LetEnv,
LoadEnv,
@ -426,13 +447,41 @@ pub fn bind_math_commands(engine_state: &mut EngineState) -> CrateResult<()> {
MathStddev,
MathSum,
MathVariance,
MathSin,
MathCos,
MathTan,
MathSinH,
MathCosH,
MathTanH,
MathArcSin,
MathArcCos,
MathArcTan,
MathArcSinH,
MathArcCosH,
MathArcTanH,
MathPi,
MathTau,
MathEuler,
MathExp,
MathLn,
MathLog,
}
}
pub fn bind_network_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands! {
engine_state,
Http,
HttpDelete,
HttpGet,
HttpHead,
HttpPatch,
HttpPost,
HttpPut,
Url,
UrlBuildQuery,
UrlEncode,
UrlJoin,
UrlParse,
Port,
}
@ -473,7 +522,6 @@ pub fn bind_hash_commands(engine_state: &mut EngineState) -> CrateResult<()> {
pub fn bind_experimental_commands(engine_state: &mut EngineState) -> CrateResult<()> {
bind_commands! {
engine_state,
ViewSource,
IsAdmin,
}
}

@ -47,6 +47,7 @@ impl ContextBuilder {
toggle_command_groups!(
core,
debug,
filter,
chart,
misc,

@ -36,6 +36,8 @@ macro_rules! command_group_config {
command_group_config!(
/// Enables core commands
core,
/// Enables debug commands
debug,
/// Enables filter commands
filter,
/// Enables chart commands

Loading…
Cancel
Save