Skip to content

Commit 4a6708a

Browse files
committed
When getting a tmux option, first check session option
It seems logical to check session options, failing which, then, check global options. This allows, for example, per-session customization of the color tmux variables.
1 parent 99e7ef7 commit 4a6708a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/helpers.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ export LC_ALL=C
44
get_tmux_option() {
55
local option="$1"
66
local default_value="$2"
7-
local option_value="$(tmux show-option -gqv "$option")"
7+
local option_value="$(tmux show-option -qv "$option")"
8+
if [ -z "$option_value" ]; then
9+
option_value="$(tmux show-option -gqv "$option")"
10+
fi
811
if [ -z "$option_value" ]; then
912
echo "$default_value"
1013
else

0 commit comments

Comments
 (0)