I'm on the Mac and I'm trying to do this in my .tmux.conf
:
bind -t vi-copy 'y' copy-selection ; run-shell 'tmux show-buffer | curl -d @- localhost:5482'
I want copy and paste to work, but I did it by running a server locally that pipes the contents of a post to pbcopy. It works when I do echo "a new paste!" | curl -d @- localhost:5482
If I just bind y run-shell 'tmux show-buffer | curl -d @- localhost:5482'
Then that works great, but in my first example, the curl is never executed. Any ideas on how to run two commands in succession like this?
The key to me is a single key bind executes two separate tmux actions.
\;
, but "tmux cannot bind multiple commands to a key under a specific key-table". Not sure if that still applies but it seems so. This may be an alternative: Getting tmux to copy a buffer to the clipboard