fix: recognize 'all' in allow-passthrough and detect iTerm.app#953
Open
chadchae wants to merge 1 commit intomierak:masterfrom
Open
fix: recognize 'all' in allow-passthrough and detect iTerm.app#953chadchae wants to merge 1 commit intomierak:masterfrom
chadchae wants to merge 1 commit intomierak:masterfrom
Conversation
…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]>
Owner
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
is_passthrough_enabled()only checked.ends_with("on"), missing tmux'sallow-passthrough allsetting. 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:
tmux show -Ap allow-passthroughreturns"all"by default, butis_passthrough_enabled()only matches"on"— users must explicitly setoninstead ofallas a workaround.\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
is_passthrough_enabled()returnstruewhenallow-passthroughis set toallEmulator::detect()correctly identifies iTerm2 viaTERM_PROGRAM=iTerm.appfallback🗿 MoAI [email protected]