mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 23:08:00 +00:00
Detach from tmux if attached, before attach (#1088)
If you are in a tmux session, and auto-start is enabled Then you `sudo su` and then `su <username>` it will re-attach, in a loop. This resolves that problem, by forcing a detach before a (re)attach.
This commit is contained in:
parent
ebae698f70
commit
0f3a5f745e
@ -37,8 +37,8 @@ if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \
|
|||||||
set-option -t "$tmux_session" destroy-unattached off &> /dev/null
|
set-option -t "$tmux_session" destroy-unattached off &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Attach to the 'prezto' session or to the last session used.
|
# Attach to the 'prezto' session or to the last session used. (detach first)
|
||||||
exec tmux $_tmux_iterm_integration attach-session
|
exec tmux $_tmux_iterm_integration attach-session -d
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user