From 24d83d1e8c84689d6fe0953f6fa6743d983fa07a Mon Sep 17 00:00:00 2001 From: Yuan-Hao Chen Date: Thu, 14 Nov 2019 20:34:02 +0800 Subject: [PATCH] tmux: fix bad tmux config syntax and logical expression error in 86b39cf (#8374) --- plugins/tmux/tmux.extra.conf | 2 +- plugins/tmux/tmux.plugin.zsh | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/tmux/tmux.extra.conf b/plugins/tmux/tmux.extra.conf index 3420d19d4..c4aaad0b0 100644 --- a/plugins/tmux/tmux.extra.conf +++ b/plugins/tmux/tmux.extra.conf @@ -1,2 +1,2 @@ set -g default-terminal $ZSH_TMUX_TERM -source $ZSH_TMUX_CONFIG \ No newline at end of file +source-file $ZSH_TMUX_CONFIG \ No newline at end of file diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index d7b299690..5b5d1b1ba 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -67,9 +67,12 @@ function _zsh_tmux_plugin_run() { # If failed, just run tmux, fixing the TERM variable if requested. if [[ $? -ne 0 ]]; then - [[ "$ZSH_TMUX_FIXTERM" == "true" ]] && tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG") || \ - [[ -e "$ZSH_TMUX_CONFIG" ]] && tmux_cmd+=(-f "$ZSH_TMUX_CONFIG") - $tmux_cmd new-session + if [[ "$ZSH_TMUX_FIXTERM" == "true" ]]; then + tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG") + elif [[ -e "$ZSH_TMUX_CONFIG" ]]; then + tmux_cmd+=(-f "$ZSH_TMUX_CONFIG") + fi + $tmux_cmd new-session fi if [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]]; then