aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/command.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-07-22 18:30:18 +0200
committerGitHub <noreply@github.com>2024-07-22 18:30:18 +0200
commitffbdb095ec5402455ac7f1cc8ef2f1bb8ebc8df2 (patch)
tree99467c7156aa1b9c2fa6d0b65464e1b0c948c913 /zellij-utils/src/input/command.rs
parentdocs(changelog): current process refresh fix (diff)
downloadsl0ppij-ffbdb095ec5402455ac7f1cc8ef2f1bb8ebc8df2.tar.gz
sl0ppij-ffbdb095ec5402455ac7f1cc8ef2f1bb8ebc8df2.tar.xz
sl0ppij-ffbdb095ec5402455ac7f1cc8ef2f1bb8ebc8df2.zip
feat(plugins): some APIs for controlling and receiving information about other panes (#3515)
* add context to opening command panes, and events for their start/finish * show/hide other panes plugin apis * get tests to pass * style(fmt): rustfmt * update plugin test snapshots
Diffstat (limited to 'zellij-utils/src/input/command.rs')
-rw-r--r--zellij-utils/src/input/command.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/zellij-utils/src/input/command.rs b/zellij-utils/src/input/command.rs
index c05aa644..2b860f66 100644
--- a/zellij-utils/src/input/command.rs
+++ b/zellij-utils/src/input/command.rs
@@ -1,5 +1,5 @@
//! Trigger a command
-use crate::data::Direction;
+use crate::data::{Direction, OriginatingPlugin};
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
@@ -35,6 +35,8 @@ pub struct RunCommand {
pub hold_on_close: bool,
#[serde(default)]
pub hold_on_start: bool,
+ #[serde(default)]
+ pub originating_plugin: Option<OriginatingPlugin>,
}
impl std::fmt::Display for RunCommand {
@@ -68,6 +70,8 @@ pub struct RunCommandAction {
pub hold_on_close: bool,
#[serde(default)]
pub hold_on_start: bool,
+ #[serde(default)]
+ pub originating_plugin: Option<OriginatingPlugin>,
}
impl From<RunCommandAction> for RunCommand {
@@ -78,6 +82,7 @@ impl From<RunCommandAction> for RunCommand {
cwd: action.cwd,
hold_on_close: action.hold_on_close,
hold_on_start: action.hold_on_start,
+ originating_plugin: action.originating_plugin,
}
}
}
@@ -91,6 +96,7 @@ impl From<RunCommand> for RunCommandAction {
direction: None,
hold_on_close: run_command.hold_on_close,
hold_on_start: run_command.hold_on_start,
+ originating_plugin: run_command.originating_plugin,
}
}
}