aboutsummaryrefslogtreecommitdiff
path: root/src/persist
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-30 01:53:55 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-30 01:55:36 +0300
commit8df1639048529b383358000879b5ee078a90b9f9 (patch)
tree7b0088246c3cc0834ed04cf20bf9726645bdb040 /src/persist
parent817a1562db9156e34f13487344ea147618f9070b (diff)
fix: use login shells for macos panes
refs #350
Diffstat (limited to 'src/persist')
-rw-r--r--src/persist/restore.rs26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/persist/restore.rs b/src/persist/restore.rs
index 916478b6..881fca6c 100644
--- a/src/persist/restore.rs
+++ b/src/persist/restore.rs
@@ -36,7 +36,7 @@ struct PaneRestoreStartup<'a> {
struct RestoreRuntimeContext<'a> {
scrollback_limit_bytes: usize,
- default_shell: &'a str,
+ shell_config: crate::pane::PaneShellConfig<'a>,
resume_agents_on_restore: bool,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
@@ -68,6 +68,7 @@ pub fn restore(
cols: u16,
scrollback_limit_bytes: usize,
default_shell: &str,
+ shell_mode: crate::config::ShellModeConfig,
resume_agents_on_restore: bool,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
@@ -80,7 +81,7 @@ pub fn restore(
rows,
cols,
scrollback_limit_bytes,
- default_shell,
+ crate::pane::PaneShellConfig::new(default_shell, shell_mode),
resume_agents_on_restore,
&mut imported_panes,
events,
@@ -94,6 +95,7 @@ pub fn restore_handoff(
snapshot: &SessionSnapshot,
scrollback_limit_bytes: usize,
default_shell: &str,
+ shell_mode: crate::config::ShellModeConfig,
imports: &mut HashMap<u32, crate::handoff_runtime::ImportedHandoffRuntime>,
events: mpsc::Sender<AppEvent>,
render_notify: Arc<Notify>,
@@ -105,7 +107,7 @@ pub fn restore_handoff(
24,
80,
scrollback_limit_bytes,
- default_shell,
+ crate::pane::PaneShellConfig::new(default_shell, shell_mode),
false,
imports,
events,
@@ -159,7 +161,7 @@ fn restore_with_imports_strict(
rows: u16,
cols: u16,
scrollback_limit_bytes: usize,
- default_shell: &str,
+ shell_config: crate::pane::PaneShellConfig<'_>,
resume_agents_on_restore: bool,
imported_panes: &mut HashMap<u32, crate::handoff_runtime::ImportedHandoffRuntime>,
events: mpsc::Sender<AppEvent>,
@@ -172,7 +174,7 @@ fn restore_with_imports_strict(
rows,
cols,
scrollback_limit_bytes,
- default_shell,
+ shell_config,
resume_agents_on_restore,
imported_panes,
events,
@@ -199,7 +201,7 @@ fn restore_with_imports(
rows: u16,
cols: u16,
scrollback_limit_bytes: usize,
- default_shell: &str,
+ shell_config: crate::pane::PaneShellConfig<'_>,
resume_agents_on_restore: bool,
imported_panes: &mut HashMap<u32, crate::handoff_runtime::ImportedHandoffRuntime>,
events: mpsc::Sender<AppEvent>,
@@ -212,7 +214,7 @@ fn restore_with_imports(
rows,
cols,
scrollback_limit_bytes,
- default_shell,
+ shell_config,
resume_agents_on_restore,
imported_panes,
events,
@@ -228,7 +230,7 @@ fn restore_with_imports_and_failures(
rows: u16,
cols: u16,
scrollback_limit_bytes: usize,
- default_shell: &str,
+ shell_config: crate::pane::PaneShellConfig<'_>,
resume_agents_on_restore: bool,
imported_panes: &mut HashMap<u32, crate::handoff_runtime::ImportedHandoffRuntime>,
events: mpsc::Sender<AppEvent>,
@@ -243,7 +245,7 @@ fn restore_with_imports_and_failures(
for (idx, ws_snap) in snapshot.workspaces.iter().enumerate() {
let runtime_context = RestoreRuntimeContext {
scrollback_limit_bytes,
- default_shell,
+ shell_config,
resume_agents_on_restore,
events: events.clone(),
render_notify: render_notify.clone(),
@@ -454,7 +456,7 @@ fn restore_tab(
cwd.clone(),
runtime_context.scrollback_limit_bytes,
crate::terminal_theme::TerminalTheme::default(),
- runtime_context.default_shell,
+ runtime_context.shell_config,
startup.initial_history_ansi,
runtime_context.events.clone(),
runtime_context.render_notify.clone(),
@@ -1053,6 +1055,7 @@ mod tests {
80,
0,
"/bin/true",
+ crate::config::ShellModeConfig::NonLogin,
false,
events,
Arc::new(Notify::new()),
@@ -1152,6 +1155,7 @@ mod tests {
80,
0,
"/bin/sh",
+ crate::config::ShellModeConfig::NonLogin,
true,
events,
Arc::new(Notify::new()),
@@ -1187,6 +1191,7 @@ mod tests {
40,
4096,
"/bin/sh",
+ crate::config::ShellModeConfig::NonLogin,
false,
events,
render_notify,
@@ -1225,6 +1230,7 @@ mod tests {
40,
4096,
"/bin/sh",
+ crate::config::ShellModeConfig::NonLogin,
false,
events,
render_notify,