diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-03-30 16:02:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-30 16:02:09 +0200 |
| commit | 8ce05f0bbd58acbbca95f95ae14fdc4e866f7391 (patch) | |
| tree | 57c6d9ee2231a556f938df4f2629511a711518df /src/main.rs | |
| parent | docs(changelog): recent windows fixes (diff) | |
| download | sl0ppij-8ce05f0bbd58acbbca95f95ae14fdc4e866f7391.tar.gz sl0ppij-8ce05f0bbd58acbbca95f95ae14fdc4e866f7391.tar.xz sl0ppij-8ce05f0bbd58acbbca95f95ae14fdc4e866f7391.zip | |
Layout string flag (#4956)
* allow sending a stringified layout with --layout-string
* add --tab-id to all the things
* fix windows tests
* add pr
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 7faf7f77..c6ebebea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,6 +51,7 @@ fn main() { block_until_exit, near_current_pane, borderless, + tab_id, })) = opts.command { let cwd = cwd.or_else(|| std::env::current_dir().ok()); @@ -93,6 +94,7 @@ fn main() { unblock_condition, near_current_pane, borderless, + tab_id, }; commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); @@ -110,6 +112,7 @@ fn main() { height, pinned, borderless, + tab_id, })) = opts.command { let cwd = None; @@ -142,6 +145,7 @@ fn main() { unblock_condition, near_current_pane: false, borderless, + tab_id, }; commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); @@ -161,6 +165,7 @@ fn main() { pinned, near_current_pane, borderless, + tab_id, })) = opts.command { let mut file = file; @@ -185,6 +190,7 @@ fn main() { pinned, near_current_pane, borderless, + tab_id, }; commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); @@ -256,7 +262,7 @@ fn main() { commands::delete_session(target_session, force); } else if let Some(path) = opts.server { commands::start_server(path, opts.debug); - } else if let Some(layout) = &opts.layout { + } else if opts.layout.is_some() || opts.layout_string.is_some() { if let Some(session_name) = opts .session .as_ref() @@ -266,7 +272,8 @@ fn main() { let config = Config::try_from(&opts).ok(); let options = Setup::from_cli_args(&opts).ok().map(|r| r.2); let new_layout_cli_action = CliAction::NewTab { - layout: Some(layout.clone()), + layout: opts.layout.clone(), + layout_string: opts.layout_string.clone(), layout_dir: options.as_ref().and_then(|o| o.layout_dir.clone()), name: None, cwd: options.as_ref().and_then(|o| o.default_cwd.clone()), |
