diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 22:12:00 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 28d11d18a739864406a37a9b2c6f3fefc450b6bc (patch) | |
| tree | ea48a3b269d2ad48f14f17bf2b7ea481a1bcd7f9 /src/dump.zig | |
| parent | 5ee1e87a917bdca38351feeca88999cd67440994 (diff) | |
| download | pardes-28d11d18a739864406a37a9b2c6f3fefc450b6bc.tar.gz pardes-28d11d18a739864406a37a9b2c6f3fefc450b6bc.zip | |
Restore brings a Tty bash pane back running bash
A dogfood agent's `Tty bash` pane came back from Restore running fish: the
dump kept its directory but not the shell it was opened on. The dump's
terminal record now carries that shell (empty for the configured one, as
older dumps read), and Restore starts it again.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/dump.zig')
| -rw-r--r-- | src/dump.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dump.zig b/src/dump.zig index 954a3270..446776d4 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -99,6 +99,9 @@ pub const PaneKind = enum { pub const Terminal = struct { cwd: []const u8 = "", + /// The shell it runs when not the configured one (`Tty bash`); empty, + /// the configured one, as in dumps from before. + shell: []const u8 = "", /// The rendered scrollback and screen as plain text, one row per line. stream: []const u8 = "", stream_b64: []const u8 = "", @@ -747,6 +750,7 @@ fn initDump(gpa: std.mem.Allocator, opts: Options, zon_bytes: []const u8, previo const restored = try pardes.panes.Terminal.restore(p, src, revive); p.installPane(i, restored); try restored.setOwnedCwd(t.cwd); + if (t.shell.len > 0) restored.shell = try gpa.dupe(u8, t.shell); if (std.mem.startsWith(u8, src.tag, "TTY ")) restored.body.mode = .tty; if (revive) p.emit(.{ .spawn = .{ .pane = @intCast(i), .serial = restored.serial, .cwd = .from(t.cwd) } }); break :terminal restored; |
