Whitelist terminal identity and pager env vars

Without TERM_PROGRAM/TERM_PROGRAM_VERSION, Claude Code and similar TUIs
can't detect the host emulator and lose capability-gated features like
Shift+Enter. Also pass through LS_COLORS, LESS*, MANPAGER, MANPATH, etc.
so interactive UX matches the host.
This commit is contained in:
2026-04-22 22:34:01 +02:00
parent 1e9b7735a8
commit 972747a891
+16
View File
@@ -36,19 +36,35 @@ const WHITELIST_KEEP_EXACT: &[&str] = &[
"LOGNAME", "LOGNAME",
"PATH", "PATH",
"SHELL", "SHELL",
"ZDOTDIR",
// terminal // terminal
"TERM", "TERM",
"TERM_PROGRAM",
"TERM_PROGRAM_VERSION",
"COLORTERM", "COLORTERM",
"COLORFGBG",
"LS_COLORS",
"NO_COLOR", "NO_COLOR",
"FORCE_COLOR", "FORCE_COLOR",
"CLICOLOR", "CLICOLOR",
// locale // locale
"LANG", "LANG",
"LANGUAGE",
"TZ", "TZ",
// editor // editor
"EDITOR", "EDITOR",
"VISUAL", "VISUAL",
"PAGER", "PAGER",
// paging
"LESS",
"LESSOPEN",
"LESSCLOSE",
"LESSKEYIN",
"MANPAGER",
"SYSTEMD_PAGER",
// man / info
"MANPATH",
"INFOPATH",
// tmp // tmp
"TMPDIR", "TMPDIR",
// proxy // proxy