Friends don't let friends tmux and root.

This commit is contained in:
James Patrick 2019-11-20 16:10:43 -05:00
parent 07485b1f02
commit 1237da247e
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,11 @@ if (( ! $+commands[tmux] )); then
return 1
fi
# If running as root, stop and return.
if [ "$EUID" -ne 0 ] ; then
return 0
fi
# If this this terminal meets any of these return.
env_array=($TMUX $EMACS $VIM $INSODE_EMACS $VSCODE)
if [[ -n $env_array ]]; then