Skip to content

Instantly share code, notes, and snippets.

@wesleybliss
Created September 26, 2013 19:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wesleybliss/6719458 to your computer and use it in GitHub Desktop.
Save wesleybliss/6719458 to your computer and use it in GitHub Desktop.
Prepend smile/frown face to command prompt based on command execution result.
PS1="\w \`if [ \$? = 0 ]; then echo -e '\[\e[01;32m\]\n^_^'; else echo -e '\[\e[01;31m\]\n>_<'; fi\` \[\e]0;\w\a\] \[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\\$\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment