Commit 4e8681c6 authored by Josh Matthews's avatar Josh Matthews
Browse files

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.
parent 86c9b320
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment