From 900e58952d460257a34b7e284bb9d9fabf41d2d6 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Mon, 26 Mar 2012 16:27:54 +0100 Subject: [PATCH] Start tmux only if the current shell isn't in tmux Also add myself as one of the author for maintenance reasons --- plugins/tmux/init.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tmux/init.zsh b/plugins/tmux/init.zsh index ffd57380..734166f4 100644 --- a/plugins/tmux/init.zsh +++ b/plugins/tmux/init.zsh @@ -3,6 +3,7 @@ # # Authors: # Sorin Ionescu +# Colin Hebert # # Usage: # To auto start it, add the following to zshrc: @@ -16,8 +17,7 @@ alias ta="tmux attach-session" alias tl="tmux list-sessions" # Auto Start -if (( $SHLVL == 1 )) && zstyle -t ':omz:plugin:tmux:auto' start; then - (( SHLVL += 1 )) && export SHLVL +if [[ -z "$TMUX" ]] && zstyle -t ':omz:plugin:tmux:auto' start; then session="$( tmux list-sessions 2> /dev/null \