nushell/crates/nu-command/src/core_commands/hide.rs

31 lines
767 B
Rust
Raw Normal View History

2021-09-28 22:32:15 +02:00
use nu_protocol::ast::Call;
2021-10-25 08:31:39 +02:00
use nu_protocol::engine::{Command, EngineState, EvaluationContext, Stack};
2021-10-25 06:01:02 +02:00
use nu_protocol::{PipelineData, Signature, SyntaxShape, Value};
2021-09-28 22:32:15 +02:00
2021-10-25 06:01:02 +02:00
#[derive(Clone)]
2021-09-28 22:32:15 +02:00
pub struct Hide;
impl Command for Hide {
fn name(&self) -> &str {
"hide"
}
fn usage(&self) -> &str {
"Hide definitions in the current scope"
}
fn signature(&self) -> nu_protocol::Signature {
Signature::build("hide").required("pattern", SyntaxShape::String, "import pattern")
}
fn run(
&self,
2021-10-25 08:31:39 +02:00
_engine_state: &EngineState,
_stack: &mut Stack,
2021-09-28 22:32:15 +02:00
call: &Call,
2021-10-25 06:01:02 +02:00
_input: PipelineData,
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
Ok(PipelineData::new())
2021-09-28 22:32:15 +02:00
}
}