Fixed restoring of alternate and active window for unnamed sessions
parent
027960ad25
commit
3513855f09
|
@ -357,11 +357,10 @@ restore_grouped_sessions() {
|
|||
}
|
||||
|
||||
restore_active_and_alternate_windows() {
|
||||
awk 'BEGIN { FS="\t"; OFS="\t" } /^window/ && $6 ~ /[*-]/ { print $2, $4, $3; }' $(last_resurrect_file) |
|
||||
sort -u |
|
||||
while IFS=$d read session_name active_window window_number; do
|
||||
tmux switch-client -t "${session_name}:${window_number}"
|
||||
done
|
||||
local active=$(awk 'BEGIN { FS="\t"; OFS="\t" } /^window/ && $6 ~ /\*/ { print $2":"$3; }' $(last_resurrect_file))
|
||||
local alternate=$(awk 'BEGIN { FS="\t"; OFS="\t" } /^window/ && $6 ~ /-/ { print $2":"$3; }' $(last_resurrect_file))
|
||||
tmux switch-client -t "$alternate"
|
||||
tmux switch-client -t "$active"
|
||||
}
|
||||
|
||||
restore_active_and_alternate_sessions() {
|
||||
|
|
Loading…
Reference in New Issue