diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 921902b..a2a9e99 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -62,9 +62,11 @@ files_differ() { ! cmp -s "$1" "$2" } -save_bash_history_option_on() { - local option="$(get_tmux_option "$bash_history_option" "off")" - [ "$option" == "on" ] +save_shell_history_option_on() { + local option_shell="$(get_tmux_option "$shell_history_option" "off")" + local option_bash="$(get_tmux_option "$bash_history_option" "off")" + + [ "$option_shell" == "on" ] || [ "$option_bash" == "on" ] } get_grouped_sessions() { diff --git a/scripts/restore.sh b/scripts/restore.sh index 458d71e..9fd03a9 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -346,7 +346,7 @@ main() { start_spinner "Restoring..." "Tmux restore complete!" restore_all_panes restore_pane_layout_for_each_window >/dev/null 2>&1 - if save_bash_history_option_on; then + if save_shell_history_option_on; then restore_shell_history fi restore_all_pane_processes diff --git a/scripts/save.sh b/scripts/save.sh index f6615b8..761f405 100755 --- a/scripts/save.sh +++ b/scripts/save.sh @@ -292,8 +292,8 @@ save_all() { pane_contents_create_archive rm "$(pane_contents_dir "save")"/* fi - if save_bash_history_option_on; then dump_bash_history + if save_shell_history_option_on; then fi } diff --git a/scripts/variables.sh b/scripts/variables.sh index 8d3edd4..726d709 100644 --- a/scripts/variables.sh +++ b/scripts/variables.sh @@ -37,7 +37,10 @@ pane_contents_option="@resurrect-capture-pane-contents" pane_contents_area_option="@resurrect-pane-contents-area" default_pane_contents_area="full" +# Keep @resurrect-save-bash-history for backward compatibility. +# It's effectively an alias to @resurrect-save-shell-history. bash_history_option="@resurrect-save-bash-history" +shell_history_option="@resurrect-save-shell-history" # set to 'on' to ensure panes are never ever overwritten overwrite_option="@resurrect-never-overwrite"