From d79fc5027bb8358e2d70a77c1f0dad96b07d41e6 Mon Sep 17 00:00:00 2001 From: David Farrell Date: Tue, 31 Mar 2020 14:02:22 -0700 Subject: [PATCH] theme/atomic: update sudo check method --- themes/atomic/atomic.theme.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/atomic/atomic.theme.bash b/themes/atomic/atomic.theme.bash index a89aeea3..5f44b34b 100644 --- a/themes/atomic/atomic.theme.bash +++ b/themes/atomic/atomic.theme.bash @@ -194,7 +194,7 @@ ___atomic_prompt_char() { color=$white prompt_char="${__ATOMIC_PROMPT_CHAR_PS1}" if [ "${THEME_SHOW_SUDO}" == "true" ]; then - if [ $(sudo -n id -u 2>&1 | grep 0) ]; then + if sudo -vn 1>/dev/null 2>&1; then prompt_char="${__ATOMIC_PROMPT_CHAR_PS1_SUDO}" fi fi