diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2021-06-30 19:56:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-30 19:56:39 +0200 |
| commit | 71f980a01d9043d9247ce410269fb67afbd9502f (patch) | |
| tree | 6a6b6f9552c23b7882412ac669d977e17961befe /zellij-utils/src | |
| parent | Merge pull request #591 from a-kenji/update-dependencies (diff) | |
| parent | fixup! Fix merged tests (diff) | |
| download | sl0ppij-71f980a01d9043d9247ce410269fb67afbd9502f.tar.gz sl0ppij-71f980a01d9043d9247ce410269fb67afbd9502f.tar.xz sl0ppij-71f980a01d9043d9247ce410269fb67afbd9502f.zip | |
Merge pull request #593 from a-kenji/modularize-spawn-terminal
Modularize spawn_terminal_function
Diffstat (limited to 'zellij-utils/src')
| -rw-r--r-- | zellij-utils/src/input/command.rs | 16 | ||||
| -rw-r--r-- | zellij-utils/src/input/mod.rs | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/zellij-utils/src/input/command.rs b/zellij-utils/src/input/command.rs new file mode 100644 index 00000000..79bbe5ab --- /dev/null +++ b/zellij-utils/src/input/command.rs @@ -0,0 +1,16 @@ +//! Trigger a command +use serde::{Deserialize, Serialize}; +use std::path::PathBuf; + +#[derive(Debug, Clone)] +pub enum TerminalAction { + OpenFile(PathBuf), + RunCommand(RunCommand), +} + +#[derive(Clone, Debug, Deserialize, Default, Serialize, PartialEq)] +pub struct RunCommand { + pub command: PathBuf, + #[serde(default)] + pub args: Vec<String>, +} diff --git a/zellij-utils/src/input/mod.rs b/zellij-utils/src/input/mod.rs index 9250cad5..5c1dc262 100644 --- a/zellij-utils/src/input/mod.rs +++ b/zellij-utils/src/input/mod.rs @@ -1,6 +1,7 @@ //! The way terminal input is handled. pub mod actions; +pub mod command; pub mod config; pub mod keybinds; pub mod layout; |
