Renamed tmux-buffers to pane-buffers for consistency with other options.

pull/62/head
Mark Eissler 2014-12-12 17:19:59 -08:00
parent e5c929f207
commit 9b609dc247
4 changed files with 11 additions and 11 deletions

View File

@ -66,8 +66,8 @@ save_bash_history_option_on() {
[ "$option" == "on" ]
}
save_tmux_buffers_option_on() {
local option="$(get_tmux_option "$save_tmux_buffers_option" "off")"
save_pane_buffers_option_on() {
local option="$(get_tmux_option "$save_pane_buffers_option" "off")"
[ "$option" == "on" ]
}

View File

@ -156,7 +156,7 @@ restore_shell_history() {
done
}
restore_tmux_buffers() {
restore_pane_buffers() {
awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ { print $2, $3, $7, $10; }' $(last_resurrect_file) |
while IFS=$'\t' read session_name window_number pane_index pane_command; do
if ! is_pane_registered_as_existing "$session_name" "$window_number" "$pane_index"; then
@ -231,10 +231,10 @@ main() {
if save_bash_history_option_on; then
restore_shell_history
fi
if save_tmux_buffers_option_on; then
if save_pane_buffers_option_on; then
# ttys need to settle after getting cleared
sleep 2
restore_tmux_buffers
restore_pane_buffers
fi
restore_all_pane_processes
# below functions restore exact cursor positions

View File

@ -97,7 +97,7 @@ save_shell_history() {
fi
}
save_tmux_buffer() {
save_pane_buffer() {
local pane_id="$1"
local pane_command="$2"
local full_command="$3"
@ -166,10 +166,10 @@ dump_bash_history() {
done
}
dump_tmux_buffers() {
dump_pane_buffers() {
dump_panes |
while IFS=$'\t' read line_type session_name window_number window_name window_active window_flags pane_index dir pane_active pane_command full_command; do
save_tmux_buffer "$session_name:$window_number.$pane_index" "$pane_command" "$full_command"
save_pane_buffer "$session_name:$window_number.$pane_index" "$pane_command" "$full_command"
done
}
@ -183,8 +183,8 @@ save_all() {
if save_bash_history_option_on; then
dump_bash_history
fi
if save_tmux_buffers_option_on; then
dump_tmux_buffers
if save_pane_buffers_option_on; then
dump_pane_buffers
fi
restore_zoomed_windows
}

View File

@ -29,4 +29,4 @@ default_save_command_strategy="ps"
bash_history_option="@resurrect-save-bash-history"
save_tmux_buffers_option="@resurrect-save-tmux-buffers"
save_pane_buffers_option="@resurrect-save-pane-buffers"