Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
Welcome to SuperUser (although I see that you’re a SO veteran). You might get better results if you (1) explain (briefly) what you are trying to accomplish, (2) describe what you have tried to solve and/or troubleshoot the problem, and (3) state a few relevant version numbers. Respond to this comment if you must, but clarification of the question should be done by editing the question. –  Scott Mar 7 '13 at 23:59
see above for more clarification –  Justin Thomas Mar 8 '13 at 0:50
Binding a tmux key to multiple commands, How can I bind multiple tmux commands to one keystroke?. So \;, 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 –  user112553 Mar 8 '13 at 1:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.