Created
January 12, 2017 20:31
-
-
Save gorgabal/5a8af0b6d6a07aac3215c1f75c7be70e to your computer and use it in GitHub Desktop.
This file contains 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
#if placed at the end of your .zshrc this wil automaticly start and attach tmux. | |
#When you attach from a new session, it wil close your previous terminal. | |
#start tmux defaultly | |
if which tmux >/dev/null 2>&1; then | |
#if not inside a tmux session, and if no session is started, start a new session | |
test -z "$TMUX" && (tmux a -d || tmux new-session) | |
fi | |
#exit if not in tmux anymore | |
if test -z ${TMUX}; then | |
exit | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment