Zend certified PHP/Magento developer

How do I make a command argument out of a tmux selection?

I’m trying to script a tmux key binding that, upon being pressed, sends the current word to a command as an argument.

So far, I’ve come up with bind -n -T copy-mode M-d send-keys -X select-word ; send-keys -X copy-pipe-and-cancel ; run "dict -d gcide $(tmux save-buffer -)", where dict -d gcide is the command I want to run and $(tmux save-buffer -) would be the argument. Yet this approach generates no output: it exits copy-mode and nothing else happens.

Any suggestions?