From 4c47728d6f4e5d603a772b480afce1b3c479c293 Mon Sep 17 00:00:00 2001 From: Julius de Boer <45075461+JuliusDeBoer@users.noreply.github.com> Date: Tue, 7 Jan 2025 09:58:15 +0100 Subject: [PATCH] Set `TERM` env variable inside the terminal (#22615) Closes #17991 Release Notes: - Set the `TERM` environment variable inside the terminal Currently the terminal inherits the `TERM` variable from the parent process. However this can cause issues with programs that rely on this variable to make sure certain features are present. For example not supporting backspaces making the terminal almost unusable. --- crates/terminal/src/terminal.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 8adbd28622c789213e691c3a8386bf5b5ec133e4..f882a31171b6138479266d41d40b8ff07f57cdbf 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -347,6 +347,7 @@ impl TerminalBuilder { env.insert("ZED_TERM".to_string(), "true".to_string()); env.insert("TERM_PROGRAM".to_string(), "zed".to_string()); + env.insert("TERM".to_string(), "alacritty".to_string()); env.insert( "TERM_PROGRAM_VERSION".to_string(), release_channel::AppVersion::global(cx).to_string(),