aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-tile
diff options
context:
space:
mode:
authorMarcin Puc <5671049+tranzystorek-io@users.noreply.github.com>2022-01-23 20:59:03 +0100
committerGitHub <noreply@github.com>2022-01-23 20:59:03 +0100
commite58b67ce2ed839dd8cbd2dadabc6e092b0e0b96a (patch)
treee7f4597ed4832cf655691dffdb92a9c32b9407a3 /zellij-tile
parentdoc(config): add copy-command examples to default config (PR #996) (#1019) (diff)
downloadsl0ppij-e58b67ce2ed839dd8cbd2dadabc6e092b0e0b96a.tar.gz
sl0ppij-e58b67ce2ed839dd8cbd2dadabc6e092b0e0b96a.tar.xz
sl0ppij-e58b67ce2ed839dd8cbd2dadabc6e092b0e0b96a.zip
chore(deps): update arg parsing to clap v3 (#1017)
* Update arg parsing to clap v3 * Ignore shell argument case
Diffstat (limited to 'zellij-tile')
-rw-r--r--zellij-tile/Cargo.toml1
-rw-r--r--zellij-tile/src/data.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/zellij-tile/Cargo.toml b/zellij-tile/Cargo.toml
index 583a7d17..b42e2124 100644
--- a/zellij-tile/Cargo.toml
+++ b/zellij-tile/Cargo.toml
@@ -7,6 +7,7 @@ description = "A small client-side library for writing Zellij plugins"
license = "MIT"
[dependencies]
+clap = { version = "3.0", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
strum = "0.20.0"
diff --git a/zellij-tile/src/data.rs b/zellij-tile/src/data.rs
index e120748a..dae7cd09 100644
--- a/zellij-tile/src/data.rs
+++ b/zellij-tile/src/data.rs
@@ -1,3 +1,4 @@
+use clap::ArgEnum;
use serde::{Deserialize, Serialize};
use std::fmt;
use std::str::FromStr;
@@ -82,7 +83,7 @@ pub enum Event {
}
/// Describes the different input modes, which change the way that keystrokes will be interpreted.
-#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, EnumIter, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, EnumIter, Serialize, Deserialize, ArgEnum)]
pub enum InputMode {
/// In `Normal` mode, input is always written to the terminal, except for the shortcuts leading
/// to other modes