-
-
Save alecthegeek/fa7a010c4229eb436366 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
#!/bin/bash | |
# manage Tmux | |
if [ -n "$TMUX" ]; then # in tmux | |
if [ -n "$COLORTERM" ]; then # in rich VT | |
export TERM=xterm-256color-italic | |
fi | |
elif tmux list-sessions > /dev/null 2>&1 ; then | |
tmux attach # try to attach | |
else | |
tmux # just start new tmux | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment