From 244289c9012e1936b525f7c74ad7186176b9f1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Tue, 28 Sep 2021 23:32:15 +0300 Subject: [PATCH] Add missing file --- crates/nu-command/src/hide.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 crates/nu-command/src/hide.rs diff --git a/crates/nu-command/src/hide.rs b/crates/nu-command/src/hide.rs new file mode 100644 index 0000000000..9c9d611e12 --- /dev/null +++ b/crates/nu-command/src/hide.rs @@ -0,0 +1,28 @@ +use nu_protocol::ast::Call; +use nu_protocol::engine::{Command, EvaluationContext}; +use nu_protocol::{Signature, SyntaxShape, Value}; + +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, + _context: &EvaluationContext, + call: &Call, + _input: Value, + ) -> Result { + Ok(Value::Nothing { span: call.head }) + } +}