diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2021-07-01 20:02:08 +0200 |
|---|---|---|
| committer | a-kenji <aks.kenji@protonmail.com> | 2021-07-01 20:02:08 +0200 |
| commit | 6f1c103e02dd33ce59a77bb3ddb8c505c74fd469 (patch) | |
| tree | 47653379ece75b364116c1706629964079313f38 /zellij-utils | |
| parent | Merge pull request #593 from a-kenji/modularize-spawn-terminal (diff) | |
| download | sl0ppij-6f1c103e02dd33ce59a77bb3ddb8c505c74fd469.tar.gz sl0ppij-6f1c103e02dd33ce59a77bb3ddb8c505c74fd469.tar.xz sl0ppij-6f1c103e02dd33ce59a77bb3ddb8c505c74fd469.zip | |
Add option to specify default-shell
* Adds an option to specify a default shell
either by specifying `default_shell: [PATH]`
in the config, or running zellij with
`zellij options --default-shell [PATH]`
Diffstat (limited to 'zellij-utils')
| -rw-r--r-- | zellij-utils/src/input/options.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zellij-utils/src/input/options.rs b/zellij-utils/src/input/options.rs index 4ebb5b86..10571978 100644 --- a/zellij-utils/src/input/options.rs +++ b/zellij-utils/src/input/options.rs @@ -20,6 +20,9 @@ pub struct Options { /// Set the default mode #[structopt(long)] pub default_mode: Option<InputMode>, + /// Set the default shell + #[structopt(long, parse(from_os_str))] + pub default_shell: Option<PathBuf>, /// Set the layout_dir, defaults to /// subdirectory of config dir #[structopt(long, parse(from_os_str))] @@ -50,6 +53,11 @@ impl Options { other => other, }; + let default_shell = match other.default_shell { + None => self.default_shell.clone(), + other => other, + }; + let layout_dir = match other.layout_dir { None => self.layout_dir.clone(), other => other, @@ -64,6 +72,7 @@ impl Options { simplified_ui, theme, default_mode, + default_shell, layout_dir, } } |
