Last active
August 29, 2015 14:14
-
-
Save CJBridges/a71eb1678e75f66d3d0c to your computer and use it in GitHub Desktop.
This is a favorite prompt of mine.
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
. /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh # for git_ps1 below | |
my_prompt() { | |
if [ $? -eq 0 ]; then | |
RC="" | |
RC_COLOR_FOR_PROMPT=$DF | |
else | |
RC="[$?]" | |
RC_COLOR_FOR_PROMPT=$RED | |
fi | |
export PS1="\n\h:\[\e[0;32m\]\w$DF$(__git_ps1)\n[\u]$RC_COLOR_FOR_PROMPT$RC$DF\$ " | |
} | |
export PROMPT_COMMAND=save_rc_for_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment