Using tmux with the OS X Pasteboard
As the title implies, this first section is a Mac specific one. If you're on any other platform, skip it.
If you're used to the OS X Pasteboard and the command line, you may be familiar with the pbcopy
and pbpaste
tools. These are two small command line utility programs that ship with OS X that allow you to pipe command line content to the system-wide clipboard and vice versa.
A sample usage would be to run a command like the following:
$ cat Sonnet16.text | pbcopy
This command will print out the contents of the Sonnet16.text
file and pipe them into the pbcopy
program, which will then make the contents of that file easy to be pasted in OS X in any program with simply ⌘ + v.
The problem is that if you try this trick within a tmux session, it won't work! This is because the OS X Pasteboard doesn't play nicely. A short way to explain it is that because tmux runs its server as a daemon (which is what allows you to detach then reattach with it still running),...