From 1a227e197197c41acd6b4c7cc55d92b57e96ef87 Mon Sep 17 00:00:00 2001 From: Scott Carroll Date: Sat, 3 May 2025 14:52:16 +0100 Subject: [PATCH] Do not tmux attach when sudoing --- bashprofile/.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashprofile/.bashrc b/bashprofile/.bashrc index 1aeac67..304ceb0 100644 --- a/bashprofile/.bashrc +++ b/bashprofile/.bashrc @@ -135,7 +135,7 @@ export MANPAGER='nvim +Man!' test -r $HOME/.bashrc-local && . $HOME/.bashrc-local -if [ -z "$TMUX" ] +if [ -z "SUDO_USER" -a -z "$TMUX" ] then tmux attach-session -t default || tmux new-session -s default fi