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 e7264987f4
commit bbd740fd0d
+7
View File
@@ -128,6 +128,13 @@ bind-key -T copy-mode-vi 'C-l' select-pane -R
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)
run '~/.tmux/plugins/tpm/tpm'