Skip to content

Instantly share code, notes, and snippets.

@kstevens715
Last active August 29, 2015 14:14
Show Gist options
  • Save kstevens715/d38624e34ba2486176dd to your computer and use it in GitHub Desktop.
Save kstevens715/d38624e34ba2486176dd to your computer and use it in GitHub Desktop.
pair will start a new tmux session named pair, or if you're already in one with another name it'll rename it to pair. It would also be nice to go a step further and have a way to toggle it back off again. This is meant to be used in conjunction with the pairing setup shown in this blog article: http://collectiveidea.com/blog/archives/2014/02/18/…
alias getmyip='dig +short myip.opendns.com @resolver1.opendns.com'
function pair() {
if [ "$TMUX" = "" ]; then
tmux new-session -s pair \; set-option display-time 4000\; display-message "Pairing Enabled: ssh pair@`getmyip`"
else
tmux rename-session pair \; set-option display-time 4000\; display-message "Pairing Enabled: ssh pair@`getmyip`"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment