Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 – peth Mar 8 '13 at 1:12

You must log in to answer this question.

Browse other questions tagged .