From 69f8e4703f6c1204f9f0958f264d2a4c4600026f Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 03:44:26 -0300 Subject: pty/run's busy names the program holding the terminal busy said only that something ran. Where the host can tell (Linux, the tty's foreground group's /proc comm, a new fg_name host call), it says busy: is running; elsewhere, busy as before. The GUI's host gains the one small callback (render agent's file: gui.zig, fgName). Co-Authored-By: Claude Opus 5.5 --- src/ninep/pty.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ninep') diff --git a/src/ninep/pty.zig b/src/ninep/pty.zig index 393516ce..6b84af61 100644 --- a/src/ninep/pty.zig +++ b/src/ninep/pty.zig @@ -189,7 +189,12 @@ pub fn writeRun(p: *Pardes, req: Req, id: usize, pane: *Pane) Reply { // marks: a nested shell's prompt (ssh, a shell with its own // integration) looks like an empty prompt to ghostty but is not the // shell this run knows. - answer(p, slot, "busy", .{}); + // Naming what runs, where the host can tell (Linux). + var name: [64]u8 = undefined; + if (p.hostForegroundName(id, &name)) |program| + answer(p, slot, "busy: {s} is running", .{program}) + else + answer(p, slot, "busy", .{}); } else { // Sent now if the shell is at its prompt, or at its first prompt // when it has not drawn one yet (noteMarks). -- cgit v1.3