How to copy to system clipboard from tmux output after mouse selection?
For os x, If you use app "Terminal". You can switch off mouse scroll and use usual copy/paste functions (cmd+c/cmd+v):
set-option -g mouse-select-pane off
set-option -g mouse-resize-pane off
set-option -g mouse-select-window off
set-window-option -g mode-mouse off
or you can use mouse scroll and select text using "fn key":
set-window-option -g mode-mouse on
If you are using iTerm2, you can copy text in Tmux session, holding down the Option key while dragging the mouse to make selection.
Then it should be possible to paste text anywhere with Cmd + V as usual. Found it here: http://web.archive.org/web/20131226003700/http://ootput.wordpress.com/2013/08/02/copy-and-paste-in-tmux-with-mouse/
If you use iTerm2 3.x, you can make copy / paste work by enabling Applications in terminal may access clipboard
:
Just highlight text with your mouse to copy it into the macOS clipboard! No need to press Option as suggested in the accepter answer.
You can also paste from the macOS clipboard into tmux with the usual Cmd + V.