summaryrefslogtreecommitdiff
path: root/plugins/tmux
diff options
context:
space:
mode:
authorYuan-Hao Chen <yhchen0906@gmail.com>2019-11-14 20:34:02 +0800
committerMarc Cornellà <marc.cornella@live.com>2019-11-14 13:34:02 +0100
commit24d83d1e8c84689d6fe0953f6fa6743d983fa07a (patch)
tree3027f9b1b776d409e8dbccfa9bbf9413aab8be0d /plugins/tmux
parent8b6b2ea07e7e18129757195731a3df5d57465807 (diff)
downloadzsh-24d83d1e8c84689d6fe0953f6fa6743d983fa07a.tar.gz
zsh-24d83d1e8c84689d6fe0953f6fa6743d983fa07a.tar.bz2
zsh-24d83d1e8c84689d6fe0953f6fa6743d983fa07a.zip
tmux: fix bad tmux config syntax and logical expression error in 86b39cf (#8374)
Diffstat (limited to 'plugins/tmux')
-rw-r--r--plugins/tmux/tmux.extra.conf2
-rw-r--r--plugins/tmux/tmux.plugin.zsh9
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