mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
Add @resurrect-save-shell-history option
Also make @resurrect-save-bash-history an alias to the new option. Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com>
This commit is contained in:
parent
e757e1b8a9
commit
655ed8c6f4
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user