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

This commit is contained in:
Yuan-Hao Chen 2019-11-14 20:34:02 +08:00 committed by Marc Cornellà
parent 8b6b2ea07e
commit 24d83d1e8c
2 changed files with 7 additions and 4 deletions

View file

@ -1,2 +1,2 @@
set -g default-terminal $ZSH_TMUX_TERM set -g default-terminal $ZSH_TMUX_TERM
source $ZSH_TMUX_CONFIG source-file $ZSH_TMUX_CONFIG

View file

@ -67,9 +67,12 @@ function _zsh_tmux_plugin_run() {
# 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
[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG") || \ if [[ "$ZSH_TMUX_FIXTERM" == "true" ]]; then
[[ -e "$ZSH_TMUX_CONFIG" ]] && tmux_cmd+=(-f "$ZSH_TMUX_CONFIG") tmux_cmd+=(-f "$_ZSH_TMUX_FIXED_CONFIG")
$tmux_cmd new-session elif [[ -e "$ZSH_TMUX_CONFIG" ]]; then
tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
fi
$tmux_cmd new-session
fi fi
if [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]]; then if [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]]; then