Skip to content

Instantly share code, notes, and snippets.

@omegahm
Created March 13, 2014 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omegahm/9524688 to your computer and use it in GitHub Desktop.
Save omegahm/9524688 to your computer and use it in GitHub Desktop.
Snippet from .bashrc
export PROMPT_COMMAND=__prompt_command
function __prompt_command() {
local EXIT="$?"
PS1="\[${YELLOW}\]\u\[${RESET}\]"
PS1+="@"
PS1+="\[${CYAN}\]\H\[${RESET}\] "
PS1+="\[${WHITE}\]\w\[${RESET}\] "
PS1+="\n"
PS1+="(\[${GREEN}\]\t\[${RESET}\]) → "
if [ $EXIT != 0 ]; then
PS1+="\[${RED}\]ಠ_ಠ\[${RESET}\] "
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment