Plugin with evaluated call (#393)

* plugin trait

* impl of trait

* record and absolute path

* plugin example crate

* clippy error

* correcting cargo

* evaluated call for plugin
This commit is contained in:
Fernando Herrera
2021-12-02 05:42:56 +00:00
committed by GitHub
parent 2bbba3f5da
commit 56307553ae
29 changed files with 1140 additions and 770 deletions

View File

@ -23,6 +23,9 @@ use nu_protocol::{
};
use reedline::{Completer, CompletionActionHandler, DefaultPrompt, LineBuffer, Prompt};
#[cfg(feature = "plugin")]
use nu_plugin::plugin::eval_plugin_signatures;
#[cfg(test)]
mod tests;
@ -412,6 +415,12 @@ fn eval_source(
report_error(&working_set, &err);
return false;
}
#[cfg(feature = "plugin")]
if let Err(err) = eval_plugin_signatures(&mut working_set) {
report_error(&working_set, &err);
}
(output, working_set.render())
};