Skip to content

Instantly share code, notes, and snippets.

@agusvama
Last active August 12, 2020 23:16
Show Gist options
  • Save agusvama/fb9f42b6437dbee482224a80b17a3f74 to your computer and use it in GitHub Desktop.
Save agusvama/fb9f42b6437dbee482224a80b17a3f74 to your computer and use it in GitHub Desktop.
Get a prompt that reacts to either a proper or wrong command, with git branch support
PS1="\`if [ \$? = 0 ];
then echo '\[\033[38;5;79m\]\w > \[\033[38;5;99m\]['\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)']\[\033[00m\]
\[\033[30;48;5;6m\]( ._.)φ__\[\033[00m\] '
else echo '\[\033[38;5;79m\]\w > \[\033[38;5;99m\]['\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)']\[\033[00m\]
\[\033[31m\]( o_o)φ__\[\033[00m\] '; fi
\`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment