forked from extern/nushell
plugin feature flag
This commit is contained in:
@ -9,8 +9,6 @@ mod hide;
|
||||
mod if_;
|
||||
mod let_;
|
||||
mod module;
|
||||
mod register;
|
||||
mod run_plugin;
|
||||
mod source;
|
||||
mod use_;
|
||||
|
||||
@ -25,7 +23,11 @@ pub use hide::Hide;
|
||||
pub use if_::If;
|
||||
pub use let_::Let;
|
||||
pub use module::Module;
|
||||
pub use register::Register;
|
||||
pub use run_plugin::RunPlugin;
|
||||
pub use source::Source;
|
||||
pub use use_::Use;
|
||||
|
||||
#[cfg(feature = "plugin")]
|
||||
mod register;
|
||||
|
||||
#[cfg(feature = "plugin")]
|
||||
pub use register::Register;
|
||||
|
@ -1,30 +0,0 @@
|
||||
use nu_protocol::ast::Call;
|
||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||
use nu_protocol::{PipelineData, Signature};
|
||||
|
||||
#[derive(Clone)]
|
||||
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: &EngineState,
|
||||
_stack: &mut Stack,
|
||||
_call: &Call,
|
||||
_input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
Ok(PipelineData::new())
|
||||
}
|
||||
}
|
@ -73,10 +73,8 @@ pub fn create_default_context() -> EngineState {
|
||||
Mv,
|
||||
ParEach,
|
||||
Ps,
|
||||
Register,
|
||||
Range,
|
||||
Rm,
|
||||
RunPlugin,
|
||||
Select,
|
||||
Size,
|
||||
Split,
|
||||
@ -94,6 +92,9 @@ pub fn create_default_context() -> EngineState {
|
||||
Zip
|
||||
);
|
||||
|
||||
#[cfg(feature = "plugin")]
|
||||
bind_command!(Register);
|
||||
|
||||
// This is a WIP proof of concept
|
||||
bind_command!(ListGitBranches, Git, GitCheckout, Source);
|
||||
|
||||
|
Reference in New Issue
Block a user