The following code used to work in my .tmux.conf
:
# Mac OS X:
bind-key -n -t emacs-copy M-w copy-pipe "reattach-to-user-namespace pbcopy"
# Move tmux copy buffer into x clipboard
unbind-key M-w
bind-key -n M-w run "tmux save-buffer - | xclip -i -selection clipboard" \; display-message 'Copying to clipboard'
It stopped working just recently, so I can't copy text anymore from tmux to elsewhere. I am guessing this is the result of upgrading tmux or reattach-to-user-namespace
.
I now get the following error:
invalid or unknown command: bind-key -n -t emacs-copy M-w copy-pipe
"reattach-to-user-namespace pbcopy"
Here are the versions I am using (from brew
).
/usr/local/Cellar/tmux/2.4/bin/tmux
/user/local/bin/reattach-to-user-namespace/2.5
What may have changed, and how can I go about restoring my ability to copy from tmux
to the system?
Best Answer
Try the following instead:
Note that
tmux
recently changed key tables: