From 010b123a88aa5278c499f83098c00bdbdb0093ce Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 14:28:27 -0300 Subject: A terminal's Tty word names its shell, Tty+fish, and a click on it opens another A terminal's tag said Tty whatever shell it ran. The host's acknowledgement of the shell it forked now sets the word to Tty+, tinted like the tag's name. Word+arg is taken as Word arg, one word a tag can hold and a click can take whole (+ is a word character), so Tty+fish opens a terminal on fish, as Tty fish does; Tty takes the shell as its argument, which the host forks for that pane instead of the configured one. Every snapshot whose screen shows a terminal's tag changes: 69 goldens, re-recorded by name, whose 297 changed lines are all Tty becoming Tty+bash (the harness runs bash), the cursor columns and style spans that moved with it, or that text cut at a pane's width. Co-Authored-By: Claude Opus 5.5 --- src/host_io.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/host_io.zig') 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; -- cgit v1.3