Created
December 6, 2011 23:50
-
-
Save neerolyte/1440668 to your computer and use it in GitHub Desktop.
This file contains 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
dschoen@dave-xps 07 10:49:34 ~ 130 | |
$ type prompt_command_lyte | |
prompt_command_lyte is a function | |
prompt_command_lyte () | |
{ | |
EXIT_STATUS="$?"; | |
if [ $UID -eq 0 ]; then | |
FONT_USER=$FONT_RED; | |
else | |
FONT_USER=$FONT_GREEN; | |
fi; | |
if [ $EXIT_STATUS -eq 0 ]; then | |
STATUS=''; | |
else | |
STATUS="$FONT_RED$EXIT_STATUS$FONT_END"; | |
fi; | |
DATE=$(date "+%d %H:%M:%S"); | |
PS1=$FONT_USER'\u@\h '$DATE' '$FONT_YELLOW'\w '$FONT_END$STATUS'\n\$ '; | |
prompt_command_title | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment