Created
September 30, 2014 22:35
-
-
Save gMagicScott/1edf8534a408fbf40607 to your computer and use it in GitHub Desktop.
Sudo aware bash prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOGNAME=$(logname) | |
UUSER=$([ "${LOGNAME}" = "${USER}" ] && echo ${USER} || echo '$(tput setaf 1)${LOGNAME}$(tput sgr0) as ${USER}') | |
PS1="[${UUSER}@\h \W]\\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment