Allow specifying a group name for the tmux session

This commit is contained in:
Brandon Siegel 2018-03-29 19:21:40 -07:00
parent 0cec462621
commit d45310e609

View File

@ -68,11 +68,11 @@ if which tmux &> /dev/null
# Try to connect to an existing session.
elif [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]]
then
\tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` attach || \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` new-session
\tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` attach `[[ -n "$ZSH_TMUX_GROUP" ]] && echo '-t '$ZSH_TMUX_GROUP` || \tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` new-session `[[ -n "$ZSH_TMUX_GROUP" ]] && echo '-t '$ZSH_TMUX_GROUP`
[[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit
# Just run tmux, fixing the TERM variable if requested.
else
\tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG`
\tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` new-session `[[ -n "$ZSH_TMUX_GROUP" ]] && echo '-t '$ZSH_TMUX_GROUP`
[[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit
fi
}