@@ -2,38 +2,54 @@ SUPPORTED_VERSION="1.9"
22
33# Key binding options and defaults
44
5- logging_key_option=" @logging-key"
65default_logging_key=" P" # Shift-p
6+ logging_key=$( tmux show-option -gqv " @logging_key" )
7+ logging_key=${logging_key:- $default_logging_key }
78
8- pane_screen_capture_key_option=" @screen-capture-key"
99default_pane_screen_capture_key=" M-p" # Alt-p
10+ pane_screen_capture_key=$( tmux show-option -gqv " @screen-capture-key" )
11+ pane_screen_capture_key=${pane_screen_capture_key:- $default_pane_screen_capture_key }
1012
11- save_complete_history_key_option=" @save-complete-history-key"
1213default_save_complete_history_key=" M-P" # Alt-Shift-p
14+ save_complete_history_key=$( tmux show-option -gqv " @save-complete-history-key" )
15+ save_complete_history_key=${save_complete_history_key:- $default_save_complete_history_key }
1316
14- clear_history_key_option=" @clear-history-key"
1517default_clear_history_key=" M-c" # Alt-c
18+ clear_history_key=$( tmux show-option -gqv " @clear-history-key" )
19+ clear_history_key=${clear_history_key:- $default_clear_history_key }
1620
1721# General options
1822filename_suffix=" #{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log"
1923
2024# Logging options
21- logging_path_option=" @logging-path"
2225default_logging_path=" $HOME "
26+ logging_path=$( tmux show-option -gqv " @logging-path" )
27+ logging_path=${logging_path:- $default_clear_history_key }
2328
24- logging_filename_option=" @logging-filename"
2529default_logging_filename=" tmux-${filename_suffix} "
30+ logging_filename=$( tmux show-option -gqv " @logging-filename" )
31+ logging_filename=${logging_filename:- $default_logging_filename }
32+
33+ logging_full_filename=" ${logging_path} /${logging_filename} "
2634
2735# Screen capture options
28- screen_capture_path_option=" @screen-capture-path"
2936default_screen_capture_path=" $HOME "
37+ screen_capture_path=$( tmux show-option -gqv " @screen-capture-path" )
38+ screen_capture_path=${screen_capture_path:- $default_screen_capture_path }
3039
31- screen_capture_filename_option=" @screen-capture-filename"
3240default_screen_capture_filename=" tmux-screen-capture-${filename_suffix} "
41+ screen_capture_filename=$( tmux show-option -gqv " @screen-capture-filename" )
42+ screen_capture_filename=${screen_capture_filename:- $default_screen_capture_filename }
43+
44+ screen_capture_full_filename=" ${screen_capture_path} /${screen_capture_filename} "
3345
3446# Save complete history options
35- save_complete_history_path_option=" @save-complete-history-path"
3647default_save_complete_history_path=" $HOME "
48+ save_complete_history_path=$( tmux show-option -gqv " @save-complete-history-path" )
49+ save_complete_history_path=${save_complete_history_path:- $default_save_complete_history_path }
3750
38- save_complete_history_filename_option=" @save-complete-history-filename"
3951default_save_complete_history_filename=" tmux-history-${filename_suffix} "
52+ save_complete_history_filename=$( tmux show-option -gqv " @save-complete-history-filename" )
53+ save_complete_history_filename=${save_complete_history_filename:- $default_save_complete_history_filename }
54+
55+ save_complete_history_full_filename=" ${save_complete_history_path} /${save_complete_history_filename} "
0 commit comments