use nu_protocol::ast::Call; use nu_protocol::engine::{Command, EvaluationContext}; use nu_protocol::{Signature, SyntaxShape, Value}; pub struct Alias; impl Command for Alias { fn name(&self) -> &str { "alias" } fn usage(&self) -> &str { "Alias a command (with optional flags) to a new name" } fn signature(&self) -> nu_protocol::Signature { Signature::build("alias") .required("name", SyntaxShape::String, "name of the alias") .required( "initial_value", SyntaxShape::Keyword(b"=".to_vec(), Box::new(SyntaxShape::Expression)), "equals sign followed by value", ) } fn run( &self, _context: &EvaluationContext, call: &Call, _input: Value, ) -> Result { Ok(Value::Nothing { span: call.head }) } }