tmux-resurrect
tmux-resurrect copied to clipboard
Sessions restore by directly using name order and overwrite index order.
In the original tmux (before prefix + Ctrl-R) , the order of sessions are sorted by three types. Sorted by index, sorted by name and sorted by time. In tmux 3.1c, sorted by index is the default option. After resurrect, the index order part is overwrote by name order. I think it may because the resurrection process re-create the sessions by name order.
Expected behavior: Support re-creating sessions by index order.
I think the order is based on the list-windows command (tmux list-windows -a -F "#{session_name}"). From what I can see it orders sessions alphabetically (in my tmux version next-3.3). Also, it seems it doesn't have a sort-order flag. And if it did have a sort-order flag it would be for windows, not sessions?
If someone can figure out a simple solution for this, a PR would be accepted.
While we're on this topic: I recommend completely ignoring session order. Use prefix + g from tmux-sessionist (or some other means) to switch sessions without looking at the session list at all.