From 26ba7b4423f8f625024520cfccdaf230fb3562fd Mon Sep 17 00:00:00 2001 From: Quentinix Date: Mon, 19 Feb 2018 17:58:02 +0100 Subject: [PATCH] Suggestion verification root user I a problem, the group maintenance receives at all times messages when I launches orders. It is better check if the user is root with "id" commande. --- themes/powerline/powerline.base.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/powerline/powerline.base.bash b/themes/powerline/powerline.base.bash index ade246e9..66900d58 100644 --- a/themes/powerline/powerline.base.bash +++ b/themes/powerline/powerline.base.bash @@ -18,7 +18,7 @@ function __powerline_user_info_prompt { local color=${USER_INFO_THEME_PROMPT_COLOR} if [[ "${THEME_CHECK_SUDO}" = true ]]; then - if sudo -n uptime 2>&1 | grep -q "load"; then + if id 2>&1 | grep -q "root"; then color=${USER_INFO_THEME_PROMPT_COLOR_SUDO} fi fi