Allow tmux session name to be passed as env var #1703
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note this is a replacement for the obsolete PR #952.
I finally got this actually figured out and rebased on master. The priority is now:
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 netyou a connection to the last used tmux session or a new one named
"zprezto" if none exists. However
env tmux_session=myname zsh
willconnect 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.
The default session name may still be set using zstyle as documented.