Last active
August 29, 2015 14:14
-
-
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/…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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