mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 06:35:56 +02:00
call and response serializers
This commit is contained in:
@ -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;
|
||||
|
34
crates/nu-command/src/core_commands/register.rs
Normal file
34
crates/nu-command/src/core_commands/register.rs
Normal 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())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user