Core nu plugin load capability. (#2544)

We introduce the `plugin` nu sub command (`nu plugin`) with basic plugin
loading support. We can choose to load plugins from a directory. Originally
introduced to make integration tests faster (by not loading any plugins on startup at all)
but `nu plugin --load some_path ; test_pipeline_that_uses_plugins_just_loaded` does not see it.

Therefore, a `nu_with_plugins!` macro for tests was introduced on top of nu`s `--skip-plugins`
switch executable which is set to true when running the integration tests that use the `nu!` macro now..
This commit is contained in:
Andrés N. Robalino
2020-09-14 09:07:02 -05:00
committed by GitHub
parent e05e6b42fe
commit 0178b53289
11 changed files with 260 additions and 18 deletions

View File

@@ -35,8 +35,8 @@ pub mod utils;
mod examples;
pub use crate::cli::{
cli, create_default_context, parse_and_eval, process_line, run_pipeline_standalone,
run_vec_of_pipelines, LineResult,
cli, create_default_context, parse_and_eval, process_line, register_plugins,
run_pipeline_standalone, run_vec_of_pipelines, LineResult,
};
pub use crate::commands::command::{
whole_stream_command, CommandArgs, EvaluatedWholeStreamCommandArgs, Example, WholeStreamCommand,