Last active
October 29, 2016 13:49
-
-
Save kevsmith/9391287 to your computer and use it in GitHub Desktop.
osx_clipboard.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq interprogram-cut-function | |
(lambda (text &optional push) | |
(let* ((process-connection-type nil) | |
(pbproxy (start-process "pbcopy" "pbcopy" "/usr/bin/pbcopy"))) | |
(process-send-string pbproxy text) | |
(process-send-eof pbproxy)))) | |
(setq interprogram-paste-function | |
(lambda () | |
(shell-command-to-string "pbpaste"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is awesome, thank you!
I found the following additional bits necessary...
At shell prompt...
brew install reattach-to-user-namespace --wrap-pbcopy-and-pbpaste
Added to ~/.tmux.conf...
set-option -g default-command "reattach-to-user-namespace -l bash"