Skip to content

fix: recognize 'all' in allow-passthrough and detect iTerm.app#953

Open
chadchae wants to merge 1 commit intomierak:masterfrom
chadchae:fix/tmux-passthrough-and-iterm-detection
Open

fix: recognize 'all' in allow-passthrough and detect iTerm.app#953
chadchae wants to merge 1 commit intomierak:masterfrom
chadchae:fix/tmux-passthrough-and-iterm-detection

Conversation

@chadchae
Copy link
Copy Markdown

Summary

  • is_passthrough_enabled() only checked .ends_with("on"), missing tmux's allow-passthrough all setting. Added "all" as a valid value.
  • Emulator::detect() TERM_PROGRAM fallback did not include "iTerm.app" or "iTerm2", causing iTerm2 to go undetected when DA1 query fails (e.g., inside tmux with passthrough issues).

Context

When running rmpc inside tmux on iTerm2:

  1. tmux show -Ap allow-passthrough returns "all" by default, but is_passthrough_enabled() only matches "on" — users must explicitly set on instead of all as a workaround.
  2. Inside tmux, the DA1 query (\x1b[>q) often fails to reach the outer terminal. The TERM_PROGRAM fallback then checks env vars, but "iTerm.app" (the value iTerm2 sets) was not in the match list, so iTerm2 goes undetected.

Test plan

  • Verify is_passthrough_enabled() returns true when allow-passthrough is set to all
  • Verify Emulator::detect() correctly identifies iTerm2 via TERM_PROGRAM=iTerm.app fallback
  • Verify album art displays correctly in tmux on iTerm2

🗿 MoAI [email protected]

…M_PROGRAM

`is_passthrough_enabled()` only checked `.ends_with("on")`, missing
tmux's `allow-passthrough all` setting. Added `"all"` as a valid value.

`Emulator::detect()` TERM_PROGRAM fallback did not include "iTerm.app"
or "iTerm2", causing iTerm2 to go undetected when DA1 query fails
(e.g., inside tmux with passthrough issues).

🗿 MoAI <[email protected]>
@mierak
Copy link
Copy Markdown
Owner

mierak commented Mar 29, 2026

Hi, thanks for the contribution. Please use the pull request template as it mentions important steps for pull requests.

The change to include "all" in allow-passthrough looks ok.

Regarding the TERM_PROGRAM, looking at iterm2 source code I see no mention of the "iTerm2" value, where is this coming from? https://github.com/search?q=repo%3Agnachman%2FiTerm2%20TERM_PROGRAM&type=code

Changelog is missing.

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