aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs9
1 files changed, 9 insertions, 0 deletions
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<MouseBinding>,
+ shell: Option<PathBuf>,
+
/// Path where config was loaded from
config_path: Option<PathBuf>,
}
@@ -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<P: Into<PathBuf>>(path: P) -> Result<Config> {
let path = path.into();
let raw = Config::read_file(path.as_path())?;