Closed hetmankp closed 1 month ago
I'd say add a flag to copy-selection
and friends (like -o
for next-prompt
) which skips setting the clipboard.
Yes I like that better than option no. 2. Is this something you'd like to see a pull request for?
It would certainly help :-).
Great, I'll try to take a look at this soon.
This issue has been automatically locked since there has not been any recent activity after it was closed.
Issue description
Current tmux behaviour means the set-clipboard option determines both the OSC 52 security level, and whether copying text into the tmux buffer also automatically sends it to the terminal emulator via OSC 52. This is a problem if one would like to use different shortcuts to copy into the tmux buffer and into the system clipboard by using OSC 52, without these two behaviours overlapping with each other.
Solutions
Two possible solutions to tackle this issue:
set-clipboard
tooff
, also means thatcopy-pipe
is not able to send OSC 52 messages to the terminal emulator. The most backwards compatible solution would probably be to create a new config option, for example calledsend-to-clipboard
and have iton
by default. This setting would determine if tmux should send copied data to the clipboard regardless of security level. This would ensure existing configurations continue working as they currently do.copy-selection
andcopy-selection-and-cancel
etc (e.g.copy-selection-no-send
?). These new commands would copy a selection to the tmux buffer but not send it onto the clipboard.Required information
tmux -V
):tmux next-3.5
uname -sp
):Linux x86_64
echo $TERM
):tmux-256color
,xterm-256color
tmux kill-server; tmux -vv new
): N/A