Don't connect to tmux in PhpStorm terminal

This commit is contained in:
Oliver Davies 2020-06-09 21:24:12 +01:00
parent 91d7ca5005
commit 211ea05c0e

View file

@ -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
}