summaryrefslogtreecommitdiff
path: root/plugins/tmux/tmux.plugin.zsh
diff options
context:
space:
mode:
authorJosh Matthews <jmatth@nbcs.rutgers.edu>2013-02-26 23:35:45 -0500
committerJosh Matthews <jmatth@nbcs.rutgers.edu>2013-02-26 23:37:53 -0500
commit4e8681c6e19f77a9b54ceee5934e3356e4ffb207 (patch)
tree2ce31fa9fd86682f1f63a25a48d451019e31890a /plugins/tmux/tmux.plugin.zsh
parent86c9b32031dc28b4c6a641a4475e0e55c7ff32e5 (diff)
downloadzsh-4e8681c6e19f77a9b54ceee5934e3356e4ffb207.tar.gz
zsh-4e8681c6e19f77a9b54ceee5934e3356e4ffb207.tar.bz2
zsh-4e8681c6e19f77a9b54ceee5934e3356e4ffb207.zip
Adding options to choose tmux TERM for 256 and non-256 color terminals.
This may be needed on systems that don't have the proper terminfo for screen and/or screen-256color. Otherwise the defaults of screen and screen-256color should be fine.
Diffstat (limited to 'plugins/tmux/tmux.plugin.zsh')
-rw-r--r--plugins/tmux/tmux.plugin.zsh12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
index 5c4076904..be92fe096 100644
--- a/plugins/tmux/tmux.plugin.zsh
+++ b/plugins/tmux/tmux.plugin.zsh
@@ -11,6 +11,14 @@
[[ -n "$ZSH_TMUX_AUTOQUIT" ]] || ZSH_TMUX_AUTOQUIT=$ZSH_TMUX_AUTOSTART
# Set term to screen or screen-256color based on current terminal support
[[ -n "$ZSH_TMUX_FIXTERM" ]] || ZSH_TMUX_FIXTERM=true
+# The TERM to use for non-256 color terminals.
+# Tmux states this should be screen, but you may need to change it on
+# systems without the proper terminfo
+[[ -n "$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR" ]] || ZSH_TMUX_FIXTERM_WITHOUT_256COLOR="screen"
+# The TERM to use for 256 color terminals.
+# Tmux states this should be screen-256color, but you may need to change it on
+# systems without the proper terminfo
+[[ -n "$ZSH_TMUX_FIXTERM_WITH_256COLOR" ]] || ZSH_TMUX_FIXTERM_WITH_256COLOR="screen-256color"
# Get the absolute path to the current directory
@@ -19,9 +27,9 @@ local zsh_tmux_plugin_path="$(cd "$(dirname "$0")" && pwd)"
# Determine if the terminal supports 256 colors
if [[ `tput colors` == "256" ]]
then
- export ZSH_TMUX_TERM="screen-256color"
+ export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
else
- export ZSH_TMUX_TERM="screen"
+ export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR
fi
# Local variable to store the local config file to use, if any.