Uh oh!
There was an error while loading. Please reload this page.
fix(tui): support copying over ssh with set-clipboard on tmux config - #30472
Conversation
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found two related PRs that are worth reviewing:
These PRs are related in that they all address OSC52 clipboard functionality, though they target different scenarios (tmux vs screen, and different output approaches). PR #30472 (the current PR) is specifically focused on fixing tmux's |
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
set-clipboard onset-clipboard on tmux configset-clipboard on tmux configset-clipboard on tmux config533aaaa to
a9093ddCompareset-clipboard on tmux configset-clipboard on tmux configset-clipboard on tmux configset-clipboard on tmux configa9093dd to
695a311Compare695a311 to
d8e561eCompare8c7098a to
bff21b8Comparebff21b8 to
6117315Compare6117315 to
5f7d102Comparesimonklee
commented
Aug 4, 2026
While simple this pr sends multiple of the |
in what case would a user be using tmux passthrough but not i'm fine not double-sending the sequence; i only proposed that so it would be easier to accept the PR on the grounds of backwards compatibility. i've modified it to only send one, so now it's a one-liner |
5f7d102 to
07cfcfbComparesimonklee
commented
Aug 4, 2026
Yeah, i buy that. |
ayubun
commented
Aug 4, 2026
is that sarcasm .. ? i genuinely cant tell o.o it really was my intention, as i even mentioned it in the PR description long before you reviewed ![]() ![]() |
simonklee
commented
Aug 4, 2026
No, i meant i think your argument is sound and that this looks good. |
ayubun
commented
Aug 4, 2026
oh i see, sorry it's difficult to read the intentions on text; thank you for your time |
simonklee
commented
Aug 4, 2026
changed my mind and went back to y our original impl. |
simonklee
commented
Aug 4, 2026
I'll test this and merge tomorrow. |
Uh oh!
There was an error while loading. Please reload this page.
anomalyco#30472) Co-authored-by: Simon Klee <hello@simonklee.dk>
anomalyco#30472) Co-authored-by: Simon Klee <hello@simonklee.dk>




Issue for this PR
Closes#25253
Closes#25252
Closes#19982
Closes#15907
Maybe Closes#36646
(possibly more?)
Type of change
What does this PR do?
the appropriate config for clipboard management in modern tmux versions is
set-clipboard: https://github.com/tmux/tmux/wiki/Clipboardthis PR makes it so that the copy to clipboard feature sends raw OSC52 when inside tmux, because that is what the
set-clipboardfeature is expecting (see tmux maintainer commentary: tmux/tmux#4214 (comment))because opencode currently sends the
\x1bPtmux;\x1bescape sequence when it recognizes theTMUXenv, theset-clipboardfeature does not function as-intended, forcing people to useallow-passthrough(which has its own security implications)How did you verify your code works?
i built the darwin and x86 binaries, and tested locally + on my remote by sending a prompt and then using the copy feature to copy the text. then, i pasted elsewhere to validate
set-clipboard ontmux config:allow-passthrough ontmux config:set-clipboard on)Screenshots / recordings
N/A
Checklist