diff --git a/scripts/restore.sh b/scripts/restore.sh index cb08b35..fb7547e 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -300,7 +300,7 @@ restore_window_properties() { } restore_shell_history() { - awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ { print $2, $3, $7, $10; }' $(last_resurrect_file) | + awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ { print $2, $3, $6, $9; }' $(last_resurrect_file) | while IFS=$d read session_name window_number pane_index pane_command; do if ! is_pane_registered_as_existing "$session_name" "$window_number" "$pane_index"; then local pane_id="$session_name:$window_number.$pane_index" @@ -321,7 +321,7 @@ restore_shell_history() { restore_all_pane_processes() { if restore_pane_processes_enabled; then local pane_full_command - awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ && $11 !~ "^:$" { print $2, $3, $7, $8, $11; }' $(last_resurrect_file) | + awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ && $10 !~ "^:$" { print $2, $3, $6, $7, $10; }' $(last_resurrect_file) | while IFS=$d read -r session_name window_number pane_index dir pane_full_command; do dir="$(remove_first_char "$dir")" pane_full_command="$(remove_first_char "$pane_full_command")" @@ -331,7 +331,7 @@ restore_all_pane_processes() { } restore_active_pane_for_each_window() { - awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ && $9 == 1 { print $2, $3, $7; }' $(last_resurrect_file) | + awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ && $8 == 1 { print $2, $3, $6; }' $(last_resurrect_file) | while IFS=$d read session_name window_number active_pane; do tmux switch-client -t "${session_name}:${window_number}" tmux select-pane -t "$active_pane" @@ -339,7 +339,7 @@ restore_active_pane_for_each_window() { } restore_zoomed_windows() { - awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ && $6 ~ /Z/ && $9 == 1 { print $2, $3; }' $(last_resurrect_file) | + awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ && $5 ~ /Z/ && $8 == 1 { print $2, $3; }' $(last_resurrect_file) | while IFS=$d read session_name window_number; do tmux resize-pane -t "${session_name}:${window_number}" -Z done diff --git a/scripts/save.sh b/scripts/save.sh index cee984b..de5246f 100755 --- a/scripts/save.sh +++ b/scripts/save.sh @@ -59,7 +59,7 @@ window_format() { format+="${delimiter}" format+="#{window_index}" format+="${delimiter}" - format+="#{window_name}" + format+=":#{window_name}" format+="${delimiter}" format+="#{window_active}" format+="${delimiter}"