Quiet warnings for utf8 options

Tmux 2.2 removed `utf8` and `status-utf8` options. Since we still want
to keep these options for earlier tmux versions we're redirecting the
output to /dev/null when setting these commands. This way tmux 2.2 (and
above) users won't get any errors when running this plugin.
This commit is contained in:
Bruno Sutic 2016-04-11 15:41:31 +02:00
parent b0a8527eb4
commit 526110eb9b
No known key found for this signature in database
GPG Key ID: CAFA7B1B2914ED81

View File

@ -67,11 +67,11 @@ key_binding_not_changed() {
main() { main() {
# OPTIONS # OPTIONS
# enable utf8 # enable utf8 (option removed in tmux 2.2)
tmux set-option -g utf8 on tmux set-option -g utf8 on 2>/dev/null
# enable utf8 in tmux status-left and status-right # enable utf8 in tmux status-left and status-right (option removed in tmux 2.2)
tmux set-option -g status-utf8 on tmux set-option -g status-utf8 on 2>/dev/null
# address vim mode switching delay (http://superuser.com/a/252717/65504) # address vim mode switching delay (http://superuser.com/a/252717/65504)
if server_option_value_not_changed "escape-time" "500"; then if server_option_value_not_changed "escape-time" "500"; then