From 7e9d2c4169245072265b483ffaa6aa05f23f08d3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 21 Oct 2026 22:53:57 -0300 Subject: A terminal under a wrapper is where its foreground shell is, not where the wrapper stays A shell that re-execs itself under a wrapper (fish's `exec 9ns --mntgen -- fish` when NINE_MOUNT is unset) left /proc//cwd at the wrapper's first directory, so the pane never followed a cd and a relative path printed after one (fd's b/c.txt) looked up nothing. host_io.ttyCwd: while the forked process still runs the shell pardes started, its own directory, as before, so a job in another directory (a nested pardes, (cd sub && make)) never names the pane; once it is something else, the tty's foreground group's when that is the same shell, else no answer. Co-Authored-By: Claude Opus 5.5 --- src/detached/server.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/detached/server.zig') diff --git a/src/detached/server.zig b/src/detached/server.zig index 41bc054f..d6a1f553 100644 --- a/src/detached/server.zig +++ b/src/detached/server.zig @@ -660,7 +660,7 @@ pub const Session = struct { for (&s.ptys, 0..) |*pt, pane| { if (pt.fd < 0) continue; var lbuf: [pardes.memory.limits.host_path_cap + 1]u8 = undefined; - if (host_io.shellCwd(pt.pid, &lbuf)) |cwd| s.core.setCwd(pane, cwd); + if (host_io.ttyCwd(pt.pid, pt.fd, s.core.settings.shell.effective.get(), &lbuf)) |cwd| s.core.setCwd(pane, cwd); } } -- cgit v1.3