Merge pull request #1535 from buhl/simple-sudo-check

Simplified-sudo-check
pull/1539/head
Nils Winkler 2020-03-31 08:51:58 +02:00 committed by GitHub
commit ca843e7b93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -18,9 +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
color=${USER_INFO_THEME_PROMPT_COLOR_SUDO}
fi
sudo -vn 1>/dev/null 2>&1 && color=${USER_INFO_THEME_PROMPT_COLOR_SUDO}
fi
case "${POWERLINE_PROMPT_USER_INFO_MODE}" in