From 54c49a5e08115c4f295fead902579bec364e1306 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Wed, 4 May 2016 20:10:55 +0300 Subject: [PATCH] Quote values for -z test. Otherwise if value is empty, you will get something like: /usr/local/share/tmux/plugins/tmux-logging/scripts/shared.sh: line 5: [: not: binary operator expected --- scripts/shared.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/shared.sh b/scripts/shared.sh index 90247a8..d16f717 100644 --- a/scripts/shared.sh +++ b/scripts/shared.sh @@ -2,7 +2,7 @@ get_tmux_option() { local option=$1 local default_value=$2 local option_value=$(tmux show-option -gqv "$option") - if [ -z $option_value ]; then + if [ -z "$option_value" ]; then echo $default_value else echo $option_value