forked from extern/nushell
plugin command
This commit is contained in:
@ -56,6 +56,7 @@ pub fn create_default_context() -> Rc<RefCell<EngineState>> {
|
||||
Mv,
|
||||
Ps,
|
||||
Rm,
|
||||
RunPlugin,
|
||||
Select,
|
||||
Size,
|
||||
Split,
|
||||
|
@ -1,7 +1,9 @@
|
||||
mod git;
|
||||
mod git_checkout;
|
||||
mod list_git_branches;
|
||||
mod run_plugin;
|
||||
|
||||
pub use git::Git;
|
||||
pub use git_checkout::GitCheckout;
|
||||
pub use list_git_branches::ListGitBranches;
|
||||
pub use run_plugin::RunPlugin;
|
||||
|
28
crates/nu-command/src/experimental/run_plugin.rs
Normal file
28
crates/nu-command/src/experimental/run_plugin.rs
Normal file
@ -0,0 +1,28 @@
|
||||
use nu_protocol::ast::Call;
|
||||
use nu_protocol::engine::{Command, EvaluationContext};
|
||||
use nu_protocol::{ShellError, Signature, Value};
|
||||
|
||||
pub struct RunPlugin;
|
||||
|
||||
impl Command for RunPlugin {
|
||||
fn name(&self) -> &str {
|
||||
"run_plugin"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"test for plugin encoding"
|
||||
}
|
||||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build("run_plugin")
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
_context: &EvaluationContext,
|
||||
_call: &Call,
|
||||
_input: Value,
|
||||
) -> Result<nu_protocol::Value, ShellError> {
|
||||
Err(ShellError::InternalError("plugin".into()))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user