Skip to content

Instantly share code, notes, and snippets.

@qnighy
Created June 23, 2015 12:53
Show Gist options
  • Save qnighy/1e976c34c5707e944932 to your computer and use it in GitHub Desktop.
Save qnighy/1e976c34c5707e944932 to your computer and use it in GitHub Desktop.
.zshrc: run tmux automatically
if [[ ! -n "${TMUX-}" ]]; then
if tmux has-session; then
tmux attach-session || exit $?
exit 0
else
tmux || exit $?
exit 0
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment