Skip to content

Commit

Permalink
Quote values for -z test.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
modax committed May 4, 2016
1 parent dca202b commit 54c49a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54c49a5

Please sign in to comment.