From 8aafc3fa24c7475a07259eb06cd5d217f510df98 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 5 Aug 2026 19:32:30 -0300 Subject: add a Shell builtin, default fish, with per-family prompt integration --- test/snapshot.zig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/snapshot.zig') diff --git a/test/snapshot.zig b/test/snapshot.zig index 39350bee..36a5b20b 100644 --- a/test/snapshot.zig +++ b/test/snapshot.zig @@ -311,6 +311,15 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const // XDG directory that points outside this per-snapshot fake home. const config_home = try std.fmt.allocPrintSentinel(arena, "{s}/.config", .{home}, 0); _ = setenv("XDG_CONFIG_HOME", config_home, 1); + // ...and it is not empty: the DEFAULT shell is fish, whose prompt carries + // a hostname and whose greeting carries a version, so a golden taken + // against it would be a golden for this machine. Every script here runs + // bash — the .bashrc above pins its prompt to `$ ` — and the fish path is + // covered by shell_bin.zig's unit tests instead. This is an ordinary + // config file going through the ordinary startup-config path, so it also + // proves `Shell ` is dispatchable from one. + try mkdir(arena, config_home, false); + try eh.writeFile(try std.fmt.allocPrintSentinel(arena, "{s}/pardes", .{config_home}, 0), "Shell bash\n"); _ = setenv("TERM", "xterm-256color", 1); _ = setenv("LC_ALL", "C", 1); // a wall clock cannot live in a golden; everything that would print one -- cgit v1.3