summaryrefslogtreecommitdiff
path: root/plugins/tmux/tmux.plugin.zsh
diff options
context:
space:
mode:
authorJosh Matthews <josh@jmatthews.us>2013-03-26 19:42:05 +0000
committerJosh Matthews <josh@jmatthews.us>2013-03-26 19:42:05 +0000
commit19ae0b576c4fd0c0c4af1a5c491df867fdce39a4 (patch)
treeaaa4aa0d5dd9ef0c08bd8661e7baaeb2d48d1a28 /plugins/tmux/tmux.plugin.zsh
parenta91872df35d15f0544339ae9c61f87e761c19827 (diff)
downloadzsh-19ae0b576c4fd0c0c4af1a5c491df867fdce39a4.tar.gz
zsh-19ae0b576c4fd0c0c4af1a5c491df867fdce39a4.tar.bz2
zsh-19ae0b576c4fd0c0c4af1a5c491df867fdce39a4.zip
Exporting path to fixed config as a global variable.
This is done to fix compatibility with antigen. To keep with convention, the variable has been renamed to be in all caps.
Diffstat (limited to 'plugins/tmux/tmux.plugin.zsh')
-rw-r--r--plugins/tmux/tmux.plugin.zsh11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
index ea6b4d26c..465f5b053 100644
--- a/plugins/tmux/tmux.plugin.zsh
+++ b/plugins/tmux/tmux.plugin.zsh
@@ -35,17 +35,14 @@ if which tmux &> /dev/null
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR
fi
- # Local variable to store the local config file to use, if any.
- local fixed_config=""
-
# Set the correct local config file to use.
if [[ -f $HOME/.tmux.conf || -h $HOME/.tmux.conf ]]
then
#use this when they have a ~/.tmux.conf
- fixed_config="$zsh_tmux_plugin_path/tmux.extra.conf"
+ export _ZSH_TMUX_FIXED_CONFIG="$zsh_tmux_plugin_path/tmux.extra.conf"
else
#use this when they don't have a ~/.tmux.conf
- fixed_config="$zsh_tmux_plugin_path/tmux.only.conf"
+ export _ZSH_TMUX_FIXED_CONFIG="$zsh_tmux_plugin_path/tmux.only.conf"
fi
# Wrapper function for tmux.
@@ -58,11 +55,11 @@ if which tmux &> /dev/null
# Try to connect to an existing session.
elif [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]]
then
- \tmux attach || \tmux `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$fixed_config` new-session
+ \tmux attach || \tmux `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG` new-session
[[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit
# Just run tmux, fixing the TERM variable if requested.
else
- \tmux `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$fixed_config`
+ \tmux `[[ "$ZSH_TMUX_FIXTERM" == "true" ]] && echo '-f '$_ZSH_TMUX_FIXED_CONFIG`
[[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit
fi
}