Extract all the variables in one place

This commit is contained in:
Bruno Sutic 2015-03-14 23:13:03 +01:00
parent 7d3135bf5c
commit d0d7348004
No known key found for this signature in database
GPG key ID: 66D96E4F2F7EF26C
3 changed files with 28 additions and 15 deletions

View file

@ -2,17 +2,17 @@
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Functions defined in capture_pane_helpers are customized via below variables.
default_path="$HOME"
default_name="tmux-history-#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log"
path_option="@save-complete-history-path"
name_option="@save-complete-history-filename"
source "$CURRENT_DIR/variables.sh"
source "$CURRENT_DIR/shared.sh"
source "$CURRENT_DIR/capture_pane_helpers.sh"
# Functions defined in capture_pane_helpers are customized via below variables.
default_path="$default_save_complete_history_path"
default_name="$default_save_complete_history_filename"
path_option="$save_complete_history_path_option"
name_option="$save_complete_history_filename_option"
main() {
if supported_tmux_version_ok; then
capture_pane "History"

View file

@ -2,17 +2,17 @@
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Functions defined in capture_pane_helpers are customized via below variables.
default_path="$HOME"
default_name="tmux-screen-capture-#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log"
path_option="@screen-capture-path"
name_option="@screen-capture-filename"
source "$CURRENT_DIR/variables.sh"
source "$CURRENT_DIR/shared.sh"
source "$CURRENT_DIR/capture_pane_helpers.sh"
# Functions defined in capture_pane_helpers are customized via below variables.
default_path="$default_screen_capture_path"
default_name="$default_screen_capture_filename"
path_option="$screen_capture_path_option"
name_option="$screen_capture_filename_option"
main() {
if supported_tmux_version_ok; then
capture_pane "Screen capture"

View file

@ -15,9 +15,22 @@ clear_history_key_option="@clear-history-key"
default_clear_history_key="M-c" # Alt-c
# Logging options
logging_path_option="@logging-path"
default_logging_path="$HOME"
logging_filename_option="@logging-filename"
default_logging_filename="tmux-#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log"
# Screen capture options
screen_capture_path_option="@screen-capture-path"
default_screen_capture_path="$HOME"
screen_capture_filename_option="@screen-capture-filename"
default_screen_capture_filename="tmux-screen-capture-#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log"
# Save complete history options
save_complete_history_path_option="@save-complete-history-path"
default_save_complete_history_path="$HOME"
save_complete_history_filename_option="@save-complete-history-filename"
default_save_complete_history_filename="tmux-history-#{session_name}-#{window_index}-#{pane_index}-%Y%m%dT%H%M%S.log"