.profile: Add sudo prompts

This commit is contained in:
Salt 2019-06-19 16:04:48 -05:00
parent 2c5d06cba2
commit c26563ec05

View File

@ -109,7 +109,7 @@ fi
# Set up editor aliases
for editor in vim vi nano; do
if command -v "$editor" > /dev/null 2>&1; then
if has "$editor"; then
export EDITOR="$editor"
break
fi
@ -129,6 +129,17 @@ if has emerge; then
fi
fi
# Sudo prompt and such
if has sudo; then
case $_baseshell in
*bash|*zsh)
export SUDO_PROMPT=$'[\e[34msudo\e[0m as %U]: Password for %p: '
;;
*)
export SUDO_PROMPT='[sudo as %U]: Password for %p: '
esac
fi
# If we have instantmusic, add aliases for that
if has instantmusic; then
alias song='instantmusic -p -s'