fix(tmux): accept OSC 52 from panes so nested tmux copy reaches the clipboard

The local tmux left set-clipboard at the default "external", which drops
OSC 52 sent by applications in a pane. In a nested setup the remote tmux
sends its copies up as OSC 52, so they never reached the Mac clipboard.
This commit is contained in:
David Ibia
2026-10-05 18:23:50 +00:00
parent 8580db4416
commit 11f43ac0e6
+7
View File
@@ -121,6 +121,13 @@ bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l bind-key -T copy-mode-vi 'C-\' select-pane -l
# Clipboard (OSC 52)
# Required for nested tmux (local tmux -> ssh/mosh -> remote tmux): the inner
# tmux sends its copies up as OSC 52, and tmux only accepts OSC 52 coming
# from a pane when set-clipboard is "on". The default "external" drops it.
set -g set-clipboard on
set -as terminal-features ',*:clipboard'
# #
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' run '~/.tmux/plugins/tpm/tpm'