I've been digging through the .tmux.conf file recently. There are a couple lines designated as copy/paste interop:
# Copy/paste interop
bind C-c run "tmux show-buffer | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
A couple things about this:
This is apparently binding Ctrl-c to run a command to copy to the Mac OSX system buffer. That's in conflict with the system's use of Ctrl-c, which is to send a SIGINT to the current application. Is this intended? Or should it instead use the meta key (i.e. Cmd) -- M-c? Update: I was forgetting that the <prefix> comes first, so this would be triggered with Ctrl-z Ctrl-c.
- Versions of tmux 2.6+ shouldn't need to do the
reattach-to-user-namespace thing anymore (source). I think that wrapper can be removed. Is there a need to support versions of tmux older than 2.6? If there is, we can add if-shell checks to only do the reattach for older versions so that reattach-to-user-namespace is not a dependency.
I tried commenting out these lines altogether to see what functionality they might be account for. I then held option while making a mouse selection, hit Cmd-c, then hit Cmd-v. It copy-pasted my selection as expected. So, are these lines even needed or is this just a vestige of terminals of yore? Update: Same mistake as above with the missing <prefix>.
I've been digging through the
.tmux.conffile recently. There are a couple lines designated as copy/paste interop:A couple things about this:
This is apparently bindingUpdate: I was forgetting that theCtrl-cto run a command to copy to the Mac OSX system buffer. That's in conflict with the system's use of Ctrl-c, which is to send a SIGINT to the current application. Is this intended? Or should it instead use the meta key (i.e. Cmd) --M-c?<prefix>comes first, so this would be triggered withCtrl-z Ctrl-c.reattach-to-user-namespacething anymore (source). I think that wrapper can be removed. Is there a need to support versions of tmux older than 2.6? If there is, we can addif-shellchecks to only do the reattach for older versions so thatreattach-to-user-namespaceis not a dependency.I tried commenting out these lines altogether to see what functionality they might be account for. I then held option while making a mouse selection, hitUpdate: Same mistake as above with the missingCmd-c, then hitCmd-v. It copy-pasted my selection as expected. So, are these lines even needed or is this just a vestige of terminals of yore?<prefix>.