diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 4ed07b128..1d1ad33d3 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -15,7 +15,7 @@ if which tmux &> /dev/null # Set term to screen or screen-256color based on current terminal support [[ -n "$ZSH_TMUX_FIXTERM" ]] || ZSH_TMUX_FIXTERM=true # Set '-CC' option for iTerm2 tmux integration - [[ -n "$$ZSH_TMUX_ITERM2" ]] || ZSH_TMUX_ITERM2=false + [[ -n "$ZSH_TMUX_ITERM2" ]] || ZSH_TMUX_ITERM2=false # The TERM to use for non-256 color terminals. # Tmux states this should be screen, but you may need to change it on # systems without the proper terminfo @@ -38,7 +38,7 @@ if which tmux &> /dev/null fi # Set the correct local config file to use. - if [[ "$ZSH_TMUX_ITERM2" == "false" ]] && (( [[ -f $HOME/.tmux.conf ]] || -h $HOME/.tmux.conf ]] )) + if [[ -a $HOME/.tmux.conf && "$ZSH_TMUX_ITERM2" == "false" ]] then #use this when they have a ~/.tmux.conf export _ZSH_TMUX_FIXED_CONFIG="$zsh_tmux_plugin_path/tmux.extra.conf" @@ -53,15 +53,15 @@ if which tmux &> /dev/null # We have other arguments, just run them if [[ -n "$@" ]] then - \tmux $@ + tmux $@ # 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 || tmux `[[ "$ZSH_TMUX_ITERM2" == "true" ]] && echo '-CC '` `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` new-session [[ "$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` [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit fi }