Created
March 20, 2015 08:40
-
-
Save ghoneycutt/3c3bf19ba55063140855 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
export SPEC_OPTS="--format documentation" | |
source $HOME/.git_bash_completion | |
# change prompt when using git | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
} | |
if [ $EUID == '0' ]; then | |
PS1="\[\e[32m\]\$(parse_git_branch)\[\e[m\]\h:\W # " | |
else | |
PS1="\[\e[32m\]\$(parse_git_branch)\[\e[m\]\h:\W\$ " | |
fi | |
export PS1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment