mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-10-02 16:03:47 +02:00
fix(tmux): use $...SESSION_NAME while attaching (#10946)
This commit is contained in:
1 parent
b692ff2e15
commit
f4dc8c5be3
1 file changed
+4
@@ -73,7 +73,11 @@ function _zsh_tmux_plugin_run() {
|
|||||||
[[ "$ZSH_TMUX_UNICODE" == "true" ]] && tmux_cmd+=(-u)
|
[[ "$ZSH_TMUX_UNICODE" == "true" ]] && tmux_cmd+=(-u)
|
||||||
|
|
||||||
# Try to connect to an existing session.
|
# Try to connect to an existing session.
|
||||||
|
if [[ -n "$ZSH_TMUX_DEFAULT_SESSION_NAME" ]]; then
|
||||||
|
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach -t $ZSH_TMUX_DEFAULT_SESSION_NAME
|
||||||
|
else
|
||||||
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach
|
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach
|
||||||
|
fi
|
||||||
|
|
||||||
# If failed, just run tmux, fixing the TERM variable if requested.
|
# If failed, just run tmux, fixing the TERM variable if requested.
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
|
|||||||
Reference in new issue
Block a user