Skip to content

Commit 6455c71

Browse files
author
Phil Hindman
committed
Add get_logging_variable helper function
1 parent c2854b2 commit 6455c71

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/toggle_logging.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ set_logging_variable() {
2929
tmux set-option -gq "@${pane_unique_id}" "$value"
3030
}
3131

32-
# this function checks if logging is happening for the current pane
33-
is_logging() {
32+
get_logging_variable() {
3433
local pane_unique_id="$(pane_unique_id)"
3534
local current_pane_logging="$(get_tmux_option "@${pane_unique_id}" "not logging")"
36-
if [ "$current_pane_logging" == "logging" ]; then
35+
echo $current_pane_logging
36+
}
37+
38+
# this function checks if logging is happening for the current pane
39+
is_logging() {
40+
if [ "$(get_logging_variable)" == "logging" ]; then
3741
return 0
3842
else
3943
return 1

0 commit comments

Comments
 (0)