Add script sourcing (#2803)

* Add script sourcing

* clippy
This commit is contained in:
Jonathan Turner
2020-12-19 20:47:34 +13:00
committed by GitHub
parent 058ef69da3
commit e5b136f70d
21 changed files with 98 additions and 42 deletions

View File

@ -26,6 +26,8 @@ pub enum CommandAction {
AddEnvVariable(String, String),
/// Add plugins from path given
AddPlugins(String),
/// Run the given script in the current context (given filename)
SourceScript(String),
/// Go to the previous shell in the shell ring buffer
PreviousShell,
/// Go to the next shell in the shell ring buffer
@ -49,6 +51,7 @@ impl PrettyDebug for CommandAction {
CommandAction::EnterHelpShell(v) => b::typed("enter help shell", v.pretty()),
CommandAction::AddVariable(..) => b::description("add variable"),
CommandAction::AddEnvVariable(..) => b::description("add environment variable"),
CommandAction::SourceScript(..) => b::description("source script"),
CommandAction::AddPlugins(..) => b::description("add plugins"),
CommandAction::PreviousShell => b::description("previous shell"),
CommandAction::NextShell => b::description("next shell"),