Unverified Commit 655ed8c6 authored by Mohammad Alsaleh's avatar Mohammad Alsaleh Committed by Bruno Sutic
Browse files

Add @resurrect-save-shell-history option



  Also make @resurrect-save-bash-history an alias to the new option.
Signed-off-by: default avatarMohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
parent e757e1b8
......@@ -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() {
......
......@@ -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
......
......@@ -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
}
......
......@@ -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"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment