Report abuse

# Set up test function for shell interactivity
case "$-" in
*i*) VERBOSE=1; ;;
*)    ;;
esac


# Only for interactive shells
if [ -n "$VERBOSE" ]; then 

    export standout=$(perl -MTerm::ANSIColor -e 'print color "bold red"')
    export standout_end="\e[m"

    parse_git_branch() {
      git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
    }
    
    PS1="\[\033[07;31m\] \[\][\!] \h \[\033[47;30m\] [\W\$( parse_git_branch)]\[\e[m\] \[\033[00;31m\] \$ \[\e[m\]"

    # # From $HOME/.bash_completion.d/git-completion.sh
    # export GIT_PS1_SHOWDIRTYSTATE=1
    # export GIT_PS1_SHOWSTASHSTATE=1
    # export GIT_PS1_SHOWUNTRACKEDFILES=1
    # export ^C1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '

    PROMPT_COMMAND='history -a'
fi