forked from extern/nushell
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:
committed by
GitHub
parent
e05e6b42fe
commit
0178b53289
@ -22,8 +22,10 @@ pub enum CommandAction {
|
||||
EnterValueShell(Value),
|
||||
/// Enter the help shell, which allows exploring the help system
|
||||
EnterHelpShell(Value),
|
||||
/// Enter the help shell, which allows exploring the help system
|
||||
/// Add an alias command
|
||||
AddAlias(String, Vec<(String, SyntaxShape)>, Block),
|
||||
/// Add plugins from path given
|
||||
AddPlugins(String),
|
||||
/// Go to the previous shell in the shell ring buffer
|
||||
PreviousShell,
|
||||
/// Go to the next shell in the shell ring buffer
|
||||
@ -46,6 +48,7 @@ impl PrettyDebug for CommandAction {
|
||||
CommandAction::EnterValueShell(v) => b::typed("enter value shell", v.pretty()),
|
||||
CommandAction::EnterHelpShell(v) => b::typed("enter help shell", v.pretty()),
|
||||
CommandAction::AddAlias(..) => b::description("add alias"),
|
||||
CommandAction::AddPlugins(..) => b::description("add plugins"),
|
||||
CommandAction::PreviousShell => b::description("previous shell"),
|
||||
CommandAction::NextShell => b::description("next shell"),
|
||||
CommandAction::LeaveShell => b::description("leave shell"),
|
||||
|
Reference in New Issue
Block a user