2

I'm trying to setup a tmux (1.9) key-binding to swap to windows. Unfortunately, I can't seem to figure out a way to send a variable for the swap. For example, if you hit C-b . It will then prompt where to move the window to. How can I get the same behavior with swap?

I have:

bind-key > swap-window -t {something else here...}
2

I figured it out. The best way to do it is to use the command-prompt feature.

bind > command-prompt -p "swap with" "swap-window -t '%%'"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.