feat(dotmatrix): color prompt mark if root
Was only warning for sudo rights.
This commit is contained in:
parent
8fbe41d0f2
commit
77f98f4b0a
1 changed files with 6 additions and 1 deletions
|
|
@ -494,8 +494,13 @@ _lp_dotmatrix_theme_prompt() {
|
|||
done
|
||||
fi
|
||||
|
||||
# Warning prompt mark if either root or sudo.
|
||||
_lp_user
|
||||
user="$?"
|
||||
# No need to check LP_ENABLE_SUDO, _lp_sudo_active does it.
|
||||
if _lp_sudo_active ; then
|
||||
_lp_sudo_active
|
||||
sudo="$?"
|
||||
if [[ "$sudo" != 0 || "$user" == 2 ]] ; then
|
||||
local dcwfg="${DOTMATRIX_COLOR_WARN[_LP_FIRST_INDEX+1]}"
|
||||
[[ -z $dcwfg ]] && dcwfg=-1
|
||||
lp_terminal_format $dcwfg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue