Skip to content

zsh: stop overriding TERM from the shell rc - #28

Open
presto8 wants to merge 1 commit into
mainfrom
fix/term-env
Open

presto8 wants to merge 1 commit into
mainfrom
fix/term-env

Conversation

@presto8

@presto8 presto8 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Hard-coding TERM=xterm-256color in .zshrc clobbers whatever the
terminal emulator and multiplexer set: kitty exports xterm-kitty and
tmux exports tmux-256color. Overriding both defeats the purpose of
install_kitty_terminfo ("install kitty terminfo so tmux and vim work
correctly") and costs true-colour and undercurl detection in neovim,
which sets termguicolors in init.lua.

TERM is the terminal's responsibility, not the shell's.


🤖 Generated with Claude Code

Hard-coding TERM=xterm-256color in .zshrc clobbers whatever the
terminal emulator and multiplexer set: kitty exports xterm-kitty and
tmux exports tmux-256color. Overriding both defeats the purpose of
install_kitty_terminfo ("install kitty terminfo so tmux and vim work
correctly") and costs true-colour and undercurl detection in neovim,
which sets termguicolors in init.lua.

TERM is the terminal's responsibility, not the shell's.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change cleanly removes a problematic environment override and the added comment accurately documents the intended behavior without introducing functional risk.

Pull request overview

Stops prestobuntu.zsh from clobbering the terminal-provided TERM value, which can interfere with correct terminfo selection in terminal emulators (e.g., kitty) and multiplexers (e.g., tmux), and degrade capability detection in terminal apps.

Changes:

  • Remove export TERM=xterm-256color from the zsh RC snippet.
  • Add an in-file note explaining why TERM should not be set from the shell rc and pointing to install_kitty_terminfo in setup.
File summaries
File Description
prestobuntu.zsh Removes hard-coded TERM and documents rationale to rely on terminal/tmux-provided TERM.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants