diff options
author | Daniel Fitzpatrick <crinklywrappr@pm.me> | 2021-09-08 16:51:44 -0500 |
---|---|---|
committer | Daniel Fitzpatrick <crinklywrappr@pm.me> | 2021-09-08 16:51:44 -0500 |
commit | 715d3d59e486805189b24ed23f05b2267bce749d (patch) | |
tree | 930f5b6f83e606918c6b16084314502d6c5c3571 /src | |
parent | 86b5befa02b542397b450b6dcf426bb3af2abe17 (diff) |
Add elvish widget
Diffstat (limited to 'src')
-rw-r--r-- | src/config/cli.rs | 3 | ||||
-rw-r--r-- | src/handler/shell.rs | 1 | ||||
-rw-r--r-- | src/shell.rs | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/config/cli.rs b/src/config/cli.rs index d32da1b..038108f 100644 --- a/src/config/cli.rs +++ b/src/config/cli.rs @@ -9,7 +9,7 @@ use clap::{crate_version, AppSettings, Clap}; use std::str::FromStr; const FINDER_POSSIBLE_VALUES: &[&str] = &["fzf", "skim"]; -const WIDGET_POSSIBLE_VALUES: &[&str] = &["bash", "zsh", "fish"]; +const WIDGET_POSSIBLE_VALUES: &[&str] = &["bash", "zsh", "fish", "elvish"]; const FUNC_POSSIBLE_VALUES: &[&str] = &["url::open", "welcome", "widget::last_command", "map::expand"]; const INFO_POSSIBLE_VALUES: &[&str] = &["cheats-example", "cheats-path", "config-path", "config-example"]; @@ -21,6 +21,7 @@ impl FromStr for Shell { "bash" => Ok(Shell::Bash), "zsh" => Ok(Shell::Zsh), "fish" => Ok(Shell::Fish), + "elvish" => Ok(Shell::Elvish), _ => Err("no match"), } } diff --git a/src/handler/shell.rs b/src/handler/shell.rs index a7b03ab..fc23eee 100644 --- a/src/handler/shell.rs +++ b/src/handler/shell.rs @@ -6,6 +6,7 @@ pub fn main(shell: &Shell) -> Result<()> { Shell::Bash => include_str!("../../shell/navi.plugin.bash"), Shell::Zsh => include_str!("../../shell/navi.plugin.zsh"), Shell::Fish => include_str!("../../shell/navi.plugin.fish"), + Shell::Elvish => include_str!("../../shell/navi.plugin.elv"), }; println!("{}", content); diff --git a/src/shell.rs b/src/shell.rs index dca6809..b894d51 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -12,6 +12,7 @@ pub enum Shell { Bash, Zsh, Fish, + Elvish, } #[derive(Error, Debug)] |