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",
"PATH",
"SHELL",
"ZDOTDIR",
// terminal
"TERM",
"TERM_PROGRAM",
"TERM_PROGRAM_VERSION",
"COLORTERM",
"COLORFGBG",
"LS_COLORS",
"NO_COLOR",
"FORCE_COLOR",
"CLICOLOR",
// locale
"LANG",
"LANGUAGE",
"TZ",
// editor
"EDITOR",
"VISUAL",
"PAGER",
// paging
"LESS",
"LESSOPEN",
"LESSCLOSE",
"LESSKEYIN",
"MANPAGER",
"SYSTEMD_PAGER",
// man / info
"MANPATH",
"INFOPATH",
// tmp
"TMPDIR",
// proxy