tmux: Shell variable definition for tmux version

Add variables for tmux major and minor version numbers. These can
subsequently be used to test for tmux version compatibility.
This commit is contained in:
Austin Beam 2014-05-03 17:55:10 -05:00
parent 9d4100af61
commit 7937ab9866
1 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,6 @@
if-shell 'test -z "$POWERLINE_COMMAND"' 'if-shell "which powerline-client" "set-environment -g POWERLINE_COMMAND powerline-client" "set-environment -g POWERLINE_COMMAND powerline"' if-shell 'test -z "$POWERLINE_COMMAND"' 'if-shell "which powerline-client" "set-environment -g POWERLINE_COMMAND powerline-client" "set-environment -g POWERLINE_COMMAND powerline"'
run-shell "tmux set-environment -g TMUX_VERSION_MAJOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')"
run-shell "tmux set-environment -g TMUX_VERSION_MINOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f2 | sed 's/[^0-9]*//g')"
set -g status on set -g status on
set -g status-utf8 on set -g status-utf8 on
set -g status-interval 2 set -g status-interval 2