Skip to content

feat(zellij,ssh): set tmux default mode, detach on close, and fix TERM over SSH - #164

Merged
bdossantos merged 2 commits into
masterfrom
copilot/review-zellij-configuration
Aug 28, 2026
Merged

feat(zellij,ssh): set tmux default mode, detach on close, and fix TERM over SSH#164
bdossantos merged 2 commits into
masterfrom
copilot/review-zellij-configuration

Conversation

Copilot AI commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Zellij config lacked sensible defaults for tmux-style usage, and connecting to remote Linux hosts from Ghostty caused unknown terminal type errors because xterm-ghostty terminfo is absent on most remote systems.

Zellij (.config/zellij/config.kdl)

  • default_mode "tmux" — tmux bindings active immediately, no need to press Ctrl a first
  • on_force_close "detach" — closing the terminal window detaches the session instead of killing it
  • copy_on_select false — text selection no longer clobbers the clipboard
  • scrollback_lines 50000 — bumped from the 10k default

SSH (.ssh/config)

  • SetEnv TERM=xterm-256color under Host * — overrides the client-side TERM (e.g. xterm-ghostty) before it reaches the remote, ensuring ncurses-based tools (vim, less, git log) work on any host without requiring terminfo installation

- Set default_mode to tmux so bindings are active immediately
- Set on_force_close to detach to match tmux behavior
- Disable copy_on_select to avoid clipboard clobber on selection
- Increase scrollback_lines to 50000
- Add SetEnv TERM=xterm-256color in ~/.ssh/config to prevent
  unknown terminal errors on remote hosts that lack xterm-ghostty
  terminfo

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
@bdossantos
bdossantos marked this pull request as ready for review August 28, 2026 10:01
Copilot AI balanced review requested due to automatic review settings August 28, 2026 10:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The initial Zellij mode intercepts shell input, and the scrollback option is invalid.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds tmux-oriented Zellij defaults and improves SSH terminal compatibility.

Changes:

  • Configures Zellij startup, detachment, clipboard, and scrollback behavior.
  • Forces a broadly supported terminal type over SSH.
File summaries
File Description
.ssh/config Sets the remote SSH terminal type.
.config/zellij/config.kdl Adds Zellij behavior defaults.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

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

Comment thread .config/zellij/config.kdl Outdated
Comment thread .config/zellij/config.kdl Outdated
Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Copilot AI requested a review from bdossantos August 28, 2026 10:06
@bdossantos
bdossantos merged commit c72c08b into master Aug 28, 2026
@bdossantos
bdossantos deleted the copilot/review-zellij-configuration branch August 28, 2026 13:12
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.

3 participants