mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 05:40:08 +00:00
tmux: do not auto-load tmux inside of Emacs/Vim
When Emacs and Vim are launched from outside of an interactive shell, $TMUX and $STY are not set; check for Emacs and Vim environment variables instead.
This commit is contained in:
parent
a52a5fb1f4
commit
ff6b4c835b
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ compdef _tmux _zsh_tmux_plugin_run
|
||||||
alias tmux=_zsh_tmux_plugin_run
|
alias tmux=_zsh_tmux_plugin_run
|
||||||
|
|
||||||
# Autostart if not already in tmux and enabled.
|
# Autostart if not already in tmux and enabled.
|
||||||
if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" ]]; then
|
if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" ]]; then
|
||||||
# Actually don't autostart if we already did and multiple autostarts are disabled.
|
# Actually don't autostart if we already did and multiple autostarts are disabled.
|
||||||
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]; then
|
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]; then
|
||||||
export ZSH_TMUX_AUTOSTARTED=true
|
export ZSH_TMUX_AUTOSTARTED=true
|
||||||
|
|
Loading…
Reference in a new issue