Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sessions restore by directly using name order and overwrite index order. #388

Open
deeperlearner opened this issue Jul 1, 2021 · 1 comment · May be fixed by #476
Open

Sessions restore by directly using name order and overwrite index order. #388

deeperlearner opened this issue Jul 1, 2021 · 1 comment · May be fixed by #476

Comments

@deeperlearner
Copy link

deeperlearner commented Jul 1, 2021

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.

@deeperlearner deeperlearner changed the title Session restore directly using name order and overwrite index order. Session restores directly using name order and overwrite index order. Jul 1, 2021
@deeperlearner deeperlearner changed the title Session restores directly using name order and overwrite index order. Session restores by directly using name order and overwrite index order. Jul 1, 2021
@deeperlearner deeperlearner changed the title Session restores by directly using name order and overwrite index order. Sessions restore by directly using name order and overwrite index order. Jul 1, 2021
@bruno-
Copy link
Member

bruno- commented Jul 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants