Skip to content

Instantly share code, notes, and snippets.

@timuruski
Created January 20, 2014 15:03
Show Gist options
  • Save timuruski/8521406 to your computer and use it in GitHub Desktop.
Save timuruski/8521406 to your computer and use it in GitHub Desktop.
# PROMPT
# ==========
# This doesn't work?
status () {
if [[ $? -gt 0 ]]; then
printf "\[\e[31m\]\$\[\e[0m\]"
else
printf "\$"
fi
}
PS1="\[\e[33m\]\h\[\e[0m\]:\[\e[4m\]\W\[\e[0m\] $(status) "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment