diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-02-28 15:47:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 15:47:08 +0100 |
commit | 9dc3cb19616ece5e363a357fc06e0e75ac8b49e0 (patch) | |
tree | 9e4a287ecc35758cf5568bdc42e55292cb830fea /src/main.rs | |
parent | b3b0ddbab82ab74c02dbc991b24f4a3c88f2bcbe (diff) |
fix(new-tab): get config parameters from config file (#2203)
* fix(cli): take default shell from config if it exists when opening new tab
* fix(cli): take layout dir from config when opening new tab if it exists
* style(fmt): rustfmt
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 77c3256d9..54ca71cb4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,6 +6,7 @@ mod tests; use zellij_utils::{ clap::Parser, cli::{CliAction, CliArgs, Command, Sessions}, + input::config::Config, logging::*, }; @@ -14,8 +15,9 @@ fn main() { let opts = CliArgs::parse(); { + let config = Config::try_from(&opts).ok(); if let Some(Command::Sessions(Sessions::Action(cli_action))) = opts.command { - commands::send_action_to_session(cli_action, opts.session); + commands::send_action_to_session(cli_action, opts.session, config); std::process::exit(0); } if let Some(Command::Sessions(Sessions::Run { @@ -37,7 +39,7 @@ fn main() { close_on_exit, start_suspended, }; - commands::send_action_to_session(command_cli_action, opts.session); + commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); } if let Some(Command::Sessions(Sessions::Edit { @@ -62,7 +64,7 @@ fn main() { floating, cwd, }; - commands::send_action_to_session(command_cli_action, opts.session); + commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); } if let Some(Command::Sessions(Sessions::ConvertConfig { old_config_file })) = opts.command { |