mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Fix for tmux plugin: 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
5667161d49
commit
71b051edc3
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ if which tmux &> /dev/null
|
||||||
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 [[ ! -n "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" ]]
|
if [[ ! -n "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && ( -n "$INSIDE_EMACS" || -n "$EMACS" || -n "$VIM" ) ]]
|
||||||
then
|
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" ]]
|
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue