From c98218d928af5831101e5d0106a7e619cb189211 Mon Sep 17 00:00:00 2001 From: Andres Rodriguez Date: Sun, 9 Apr 2023 08:30:30 -0700 Subject: [PATCH] feat(session): preserve user session order on save. closes #388 --- scripts/save.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/save.sh b/scripts/save.sh index 01edcdeb..fa858299 100755 --- a/scripts/save.sh +++ b/scripts/save.sh @@ -27,6 +27,8 @@ grouped_sessions_format() { pane_format() { local format + format+="#{session_id}" + format+="${delimiter}" format+="pane" format+="${delimiter}" format+="#{session_name}" @@ -55,6 +57,8 @@ pane_format() { window_format() { local format + format+="#{session_id}" + format+="${delimiter}" format+="window" format+="${delimiter}" format+="#{session_name}" @@ -82,11 +86,11 @@ state_format() { } dump_panes_raw() { - tmux list-panes -a -F "$(pane_format)" + tmux list-panes -a -F "$(pane_format)" | sort -k1 | cut -f2- } dump_windows_raw(){ - tmux list-windows -a -F "$(window_format)" + tmux list-windows -a -F "$(window_format)" | sort -k1 | cut -f2- } toggle_window_zoom() {