From 211ea05c0e2b89254805b47977d84a23c04f677c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 9 Jun 2020 21:24:12 +0100 Subject: [PATCH] Don't connect to tmux in PhpStorm terminal --- tag-zsh/zsh/configs/tmux.zsh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tag-zsh/zsh/configs/tmux.zsh b/tag-zsh/zsh/configs/tmux.zsh index 35896603..f74e28cd 100644 --- a/tag-zsh/zsh/configs/tmux.zsh +++ b/tag-zsh/zsh/configs/tmux.zsh @@ -2,8 +2,16 @@ _not_inside_tmux() { [[ -z "$TMUX" ]] } +_not_inside_phpstorm() { + if is_macos; then + [[ "$TERM_PROGRAM" != "" ]] + elif is_linux; then + [[ "$TERMINAL_EMULATOR" != "JetBrains"* ]] + fi +} + ensure_tmux_is_running() { - if _not_inside_tmux; then + if _not_inside_tmux && _not_inside_phpstorm; then tat fi }