Last active
December 27, 2015 01:29
-
-
Save pgib/7245288 to your computer and use it in GitHub Desktop.
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
export TERM="screen-256color" | |
if tty -s; then | |
if [ -z "$WINDOW" ]; then | |
if tmux has-session -t devops; then | |
echo -n "tmux found. Re-attach? [Y/n]: " | |
read response | |
case $response in | |
N*|n*) | |
echo "Okay. Type 'tmux attach' later..." | |
;; | |
*) | |
tmux attach | |
;; | |
esac | |
else | |
echo -n "Should we start up tmux? [Y/n]: " | |
read response | |
case $response in | |
N*|n*) | |
echo "Okay. Type 'tmux new-session -t devops' later..." | |
;; | |
*) | |
tmux new-session -t devops | |
;; | |
esac | |
fi | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment