From ea44427be3af0b400e08f598f35ad48e73bc60a1 Mon Sep 17 00:00:00 2001 From: Honza Pokorny Date: Fri, 6 Jan 2017 22:06:45 -0400 Subject: Add "shell" option to config This allows you to configure the shell to use when alacritty starts. cc: #122 --- src/config.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 36f0c363..188042ed 100644 --- a/src/config.rs +++ b/src/config.rs @@ -196,6 +196,8 @@ pub struct Config { #[serde(default="default_mouse_bindings")] mouse_bindings: Vec, + shell: Option, + /// Path where config was loaded from config_path: Option, } @@ -228,6 +230,7 @@ impl Default for Config { colors: Default::default(), key_bindings: Vec::new(), mouse_bindings: Vec::new(), + shell: None, config_path: None, } } @@ -878,6 +881,12 @@ impl Config { .map(|p| p.as_path()) } + pub fn shell(&self) -> Option<&Path> { + self.shell + .as_ref() + .map(|p| p.as_path()) + } + fn load_from>(path: P) -> Result { let path = path.into(); let raw = Config::read_file(path.as_path())?; -- cgit