24d83d1e8c84689d6fe0953f6fa6743d983fa07a

Author
Yuan-Hao Chen <yhchen0906@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

tmux: fix bad tmux config syntax and logical expression error in 86b39cf (#8374)


Diff

 1diff --git a/plugins/tmux/tmux.extra.conf b/plugins/tmux/tmux.extra.conf
 2index 3420d19d4324c0fca0c3ed138e5bbf13ce5f666a..c4aaad0b0ad250992c5146700031ff9e39158167 100644
 3--- a/plugins/tmux/tmux.extra.conf
 4+++ b/plugins/tmux/tmux.extra.conf
 5@@ -1,2 +1,2 @@
 6 set -g default-terminal $ZSH_TMUX_TERM
 7-source $ZSH_TMUX_CONFIG
 8+source-file $ZSH_TMUX_CONFIG
 9diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
10index d7b29969073c7c128036e8fb4cdf2ae457efe0ea..5b5d1b1ba342f726563b83f3009cabba1b163b35 100644
11--- a/plugins/tmux/tmux.plugin.zsh
12+++ b/plugins/tmux/tmux.plugin.zsh
13@@ -67,9 +67,12 @@ function _zsh_tmux_plugin_run() {
14 
15   # If failed, just run tmux, fixing the TERM variable if requested.
16   if [[ $? -ne 0 ]]; then
17-    [[ "$ZSH_TMUX_FIXTERM" == "true" ]] && tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG") || \
18-    [[ -e "$ZSH_TMUX_CONFIG" ]] && tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
19-    $tmux_cmd new-session  
20+    if [[ "$ZSH_TMUX_FIXTERM" == "true" ]]; then
21+      tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG")
22+    elif [[ -e "$ZSH_TMUX_CONFIG" ]]; then
23+      tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
24+    fi
25+    $tmux_cmd new-session
26   fi
27 
28   if [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]]; then