From a7df06da8b5cda7ffe5f7609429c4f81a1ef834a Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 7 Apr 2026 22:02:13 +0200 Subject: [PATCH] fix(terminal): export TERM if not inherited --- src/tui/terminal_view.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tui/terminal_view.zig b/src/tui/terminal_view.zig index 9f9d4350..5c379a60 100644 --- a/src/tui/terminal_view.zig +++ b/src/tui/terminal_view.zig @@ -1,6 +1,5 @@ const std = @import("std"); const builtin = @import("builtin"); -const build_options = @import("build_options"); const Allocator = std.mem.Allocator; const tp = @import("thespian"); @@ -74,6 +73,8 @@ pub fn create(allocator: Allocator, parent: Plane, ctx: command.Context) !Widget pub fn run_cmd(self: *Self, ctx: command.Context) !void { var env = try std.process.getEnvMap(self.allocator); errdefer env.deinit(); + if (env.get("TERM") == null) + try env.put("TERM", "xterm-256color"); var cmd_arg: []const u8 = ""; var on_exit: TerminalOnExit = tui.config().terminal_on_exit;