Category option for signature (#343)

* category option for signature

* category option for signature

* column description for $scope
This commit is contained in:
Fernando Herrera
2021-11-17 04:22:37 +00:00
committed by GitHub
parent 6fbe02eb21
commit b35914bd17
118 changed files with 739 additions and 335 deletions

View File

@ -1,7 +1,7 @@
use nu_protocol::{
ast::Call,
engine::{Command, EngineState, Stack},
Example, PipelineData, ShellError, Signature, Span, Type, Value,
Category, Example, PipelineData, ShellError, Signature, Span, Type, Value,
};
#[derive(Clone)]
@ -13,7 +13,7 @@ impl Command for SubCommand {
}
fn signature(&self) -> Signature {
Signature::build("split chars")
Signature::build("split chars").category(Category::Strings)
}
fn usage(&self) -> &str {

View File

@ -2,7 +2,7 @@ use nu_engine::CallExt;
use nu_protocol::{
ast::Call,
engine::{Command, EngineState, Stack},
PipelineData, ShellError, Signature, Span, Spanned, SyntaxShape, Type, Value,
Category, PipelineData, ShellError, Signature, Span, Spanned, SyntaxShape, Type, Value,
};
#[derive(Clone)]
@ -26,6 +26,7 @@ impl Command for SubCommand {
SyntaxShape::String,
"column names to give the new columns",
)
.category(Category::Strings)
}
fn usage(&self) -> &str {

View File

@ -2,7 +2,7 @@ use nu_engine::get_full_help;
use nu_protocol::{
ast::Call,
engine::{Command, EngineState, Stack},
IntoPipelineData, PipelineData, Signature, Value,
Category, IntoPipelineData, PipelineData, Signature, Value,
};
#[derive(Clone)]
@ -14,7 +14,7 @@ impl Command for SplitCommand {
}
fn signature(&self) -> Signature {
Signature::build("split")
Signature::build("split").category(Category::Strings)
}
fn usage(&self) -> &str {

View File

@ -2,7 +2,7 @@ use nu_engine::CallExt;
use nu_protocol::{
ast::Call,
engine::{Command, EngineState, Stack},
PipelineData, ShellError, Signature, Span, Spanned, SyntaxShape, Type, Value,
Category, PipelineData, ShellError, Signature, Span, Spanned, SyntaxShape, Type, Value,
};
#[derive(Clone)]
@ -14,11 +14,13 @@ impl Command for SubCommand {
}
fn signature(&self) -> Signature {
Signature::build("split row").required(
"separator",
SyntaxShape::String,
"the character that denotes what separates rows",
)
Signature::build("split row")
.required(
"separator",
SyntaxShape::String,
"the character that denotes what separates rows",
)
.category(Category::Strings)
}
fn usage(&self) -> &str {