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

Allow tmux session name to be passed as env var #952

Closed
wants to merge 1 commit into from

Conversation

alerque
Copy link

@alerque alerque commented Aug 19, 2015

For normal usage this change should be a NOOP. However it enables the
use case where the user might want to predefine what session gets
connected to when the shell is launched. Running zsh will still net
you a connection to the last used tmux session or a new one named
"zprezto" if none exists. However env tmux_session=myname zsh will
connect you specifically to a session called 'myname' including creating
it if it doesn't exist.

This is particularly useful in window managers where a key binding might
open a terminal with a predefined session or even show a list of current
sessions and open a new terminal connected to that session.

@sorin-ionescu
Copy link
Owner

I don't use tmux that often. I'll let users who do vote on this. There are a few other tmux-related pull requests you may want to verify.

@alerque
Copy link
Author

alerque commented Aug 24, 2015

Thanks. There seems to be a little overlap with #607 and merging one or the other of these would require some minor rebasing to fix. Functionally however they cover different ground.

For normal usage this change should be a NOOP. However it enables the
use case where the user might want to predefine what session gets
connected to when the shell is launched. Running `zsh` will still net
you a connection to the last used tmux session or a new one named
"zprezto" if none exists. However `env tmux_session=myname zsh` will
connect you specifically to a session called 'myname' including creating
it if it doesn't exist.

This is particularly useful in window managers where a key binding might
open a terminal with a predefined session or even show a list of current
sessions and open a new terminal connected to that session.
@alerque
Copy link
Author

alerque commented Apr 1, 2019

I tried rebasing this since the conflicting PR was merged some time ago but the result didn't actually work as advertised. I'll re-open this when I figure out how to make it work again.

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

Successfully merging this pull request may close these issues.

None yet

2 participants