summaryrefslogtreecommitdiff
path: root/src/host_io.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/host_io.zig')
-rw-r--r--src/host_io.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/host_io.zig b/src/host_io.zig
index 820cb2b6..63b907ac 100644
--- a/src/host_io.zig
+++ b/src/host_io.zig
@@ -976,7 +976,9 @@ pub fn forkShell(
};
var master: c_int = -1;
var path_buf: [std.fs.max_path_bytes]u8 = undefined;
- var spawn = Shell.resolve(bin, &path_buf, prompt_rcs);
+ // A terminal opened on a shell of its own (`Tty fish`) runs that one.
+ const own = if (core) |c| if (c.panes[pane]) |pn| pn.shell else null else null;
+ var spawn = Shell.resolve(own orelse bin, &path_buf, prompt_rcs);
// A command pane's child is the shell running its one line, which has
// no prompt to mark (exec.zig runCommand).
const one_line = if (core) |c| if (c.panes[pane]) |pn| pn.command else null else null;