forked from extern/nushell
Category option for signature (#343)
* category option for signature * category option for signature * column description for $scope
This commit is contained in:
3
crates/nu-command/src/env/let_env.rs
vendored
3
crates/nu-command/src/env/let_env.rs
vendored
@ -1,7 +1,7 @@
|
||||
use nu_engine::eval_expression;
|
||||
use nu_protocol::ast::Call;
|
||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||
use nu_protocol::{PipelineData, Signature, SyntaxShape};
|
||||
use nu_protocol::{Category, PipelineData, Signature, SyntaxShape};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct LetEnv;
|
||||
@ -23,6 +23,7 @@ impl Command for LetEnv {
|
||||
SyntaxShape::Keyword(b"=".to_vec(), Box::new(SyntaxShape::String)),
|
||||
"equals sign followed by value",
|
||||
)
|
||||
.category(Category::Env)
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
3
crates/nu-command/src/env/with_env.rs
vendored
3
crates/nu-command/src/env/with_env.rs
vendored
@ -7,7 +7,7 @@ use nu_engine::{eval_block, CallExt};
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
engine::{Command, EngineState, Stack},
|
||||
Example, PipelineData, ShellError, Signature, SyntaxShape, Value,
|
||||
Category, Example, PipelineData, ShellError, Signature, SyntaxShape, Value,
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -30,6 +30,7 @@ impl Command for WithEnv {
|
||||
SyntaxShape::Block(Some(vec![SyntaxShape::Any])),
|
||||
"the block to run once the variable is set",
|
||||
)
|
||||
.category(Category::Env)
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
|
Reference in New Issue
Block a user