From b03338789f5c9f3619a1ace7fcda842bc073c4dc Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 10:38:30 -0300 Subject: pty/run on a fresh terminal waits for the shell's first prompt instead of answering busy A new terminal's shell takes tens of milliseconds to draw its first prompt, and a run written meanwhile answered busy, so a script's first command was lost, while pty/status said busy 0. A line written before the first prompt now waits for it and is sent then (a respawn in between keeps it waiting for the new shell), and pty/status's third field says what a run would be told: busy while a command runs or text is typed at the prompt, not before the first prompt. Co-Authored-By: Claude Opus 5.5 --- src/pardes.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 442a3a30..405e7839 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4307,7 +4307,7 @@ pub const Pardes = struct { pub fn acknowledgeShell(p: *Pardes, id: usize, executable: []const u8, prompt_marks: bool) void { if (id < MAX_PANES) if (p.panes[id]) |pane| { - ctlfs.pty.shellGone(p, pane); // a respawn replaced whatever ran + ctlfs.pty.shellGone(p, pane, true); // a respawn replaced whatever ran pane.fs.unmarked = !prompt_marks; }; if (id < MAX_PANES) panes.Terminal.shellSpawned(p, id, prompt_marks); -- cgit v1.3