call and response serializers

This commit is contained in:
Fernando Herrera
2021-10-31 08:17:01 +00:00
parent 37f7a36123
commit a390f66dbf
18 changed files with 680 additions and 274 deletions

View File

@ -8,6 +8,7 @@ mod hide;
mod if_;
mod let_;
mod module;
mod register;
mod source;
mod use_;
@ -21,5 +22,6 @@ pub use hide::Hide;
pub use if_::If;
pub use let_::Let;
pub use module::Module;
pub use register::Register;
pub use source::Source;
pub use use_::Use;

View File

@ -0,0 +1,34 @@
use nu_protocol::ast::Call;
use nu_protocol::engine::{Command, EngineState, Stack};
use nu_protocol::{PipelineData, Signature, SyntaxShape};
#[derive(Clone)]
pub struct Register;
impl Command for Register {
fn name(&self) -> &str {
"register"
}
fn usage(&self) -> &str {
"Register a plugin"
}
fn signature(&self) -> nu_protocol::Signature {
Signature::build("register").required(
"plugin",
SyntaxShape::Filepath,
"location of bin for plugin",
)
}
fn run(
&self,
_engine_state: &EngineState,
_stack: &mut Stack,
_call: &Call,
_input: PipelineData,
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
Ok(PipelineData::new())
}
}