You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a particular plugin or theme? If so, specify it.
Yes, the tmux plugin.
Is your feature request related to a problem? Please describe.
I like to leave tmux sessions that I may use later open (e.g. closing a terminal window with actually exiting the shell, disconnecting from an ssh-hosted tmux session). Then, simply opening a new window re-attaches to the unattached session. If there are no unattached sessions, I probably want a new session. ZSH_TMUX_AUTOCONNECT doesn't serve this purpose because it always autoconnects, so every new window will connect to the exact same session.
Describe the solution you'd like
I prefer the behavior described above, and I don't see a simple way to implement this outside the plugin (e.g. only specifying args to the alias). I think it's reasonable for ZSH_TMUX_AUTOCONNECT to use this behavior instead of its current behavior. Its current behavior seems limited since it also just auto-attaches to the first open session. If you meant to attach multiple times to a specific session, the default s bind is more flexible.
Describe alternatives you've considered
I currently use my fork that implements this, but I also considered with the tmux alias' argument override was a possible solution. I didn't find a way to implement this in that way though, at least not without duplicating the plugin's startup logic.
Additional context
A commit implementing this is here: btolsch@c64f701
This discussion was converted from issue #8680 on October 08, 2023 13:06.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is your feature request related to a particular plugin or theme? If so, specify it.
Yes, the
tmux
plugin.Is your feature request related to a problem? Please describe.
I like to leave tmux sessions that I may use later open (e.g. closing a terminal window with actually exiting the shell, disconnecting from an ssh-hosted tmux session). Then, simply opening a new window re-attaches to the unattached session. If there are no unattached sessions, I probably want a new session.
ZSH_TMUX_AUTOCONNECT
doesn't serve this purpose because it always autoconnects, so every new window will connect to the exact same session.Describe the solution you'd like
I prefer the behavior described above, and I don't see a simple way to implement this outside the plugin (e.g. only specifying args to the alias). I think it's reasonable for
ZSH_TMUX_AUTOCONNECT
to use this behavior instead of its current behavior. Its current behavior seems limited since it also just auto-attaches to the first open session. If you meant to attach multiple times to a specific session, the defaults
bind is more flexible.Describe alternatives you've considered
I currently use my fork that implements this, but I also considered with the
tmux
alias' argument override was a possible solution. I didn't find a way to implement this in that way though, at least not without duplicating the plugin's startup logic.Additional context
A commit implementing this is here: btolsch@c64f701
Beta Was this translation helpful? Give feedback.
All reactions