浏览代码

tmux: fix regression after f584de5

Fixes #7041
Marc Cornellà 6 年之前
父节点
当前提交
76d3eedf7f
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      plugins/tmux/tmux.plugin.zsh

+ 1 - 3
plugins/tmux/tmux.plugin.zsh

@@ -60,9 +60,7 @@ function _zsh_tmux_plugin_run() {
   [[ "$ZSH_TMUX_ITERM2" == "true" ]] && tmux_cmd+=(-CC)
   [[ "$ZSH_TMUX_ITERM2" == "true" ]] && tmux_cmd+=(-CC)
 
 
   # Try to connect to an existing session.
   # Try to connect to an existing session.
-  if [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]]; then
-    $tmux_cmd attach
-  fi
+  [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach
 
 
   # If failed, just run tmux, fixing the TERM variable if requested.
   # If failed, just run tmux, fixing the TERM variable if requested.
   if [[ $? -ne 0 ]]; then
   if [[ $? -ne 0 ]]; then