jxson
12/5/2012 - 7:25 PM

simple dot files

simple dot files

# PATH and common settings go here, .bashrc is loaded when new windows are opened
#
# .bash_profile is executed for login shells, while .bashrc is executed for
# interactive non-login shells.
# http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html

bind "set completion-ignore-case on"

export COLOR_NONE='\[\e[0m\]' # No Color
export COLOR_LIGHT_PURPLE='\[\e[1;35m\]'
export COLOR_ELECTRIC_YELLOW='\[\e[0;93m\]'

source '/usr/local/etc/bash_completion.d/git-prompt.sh'
source '/usr/local/etc/bash_completion.d/git-completion.bash'

# Get the name of the branch we are on
git_prompt_info() {
  branch_prompt=$(__git_ps1)
  if [ -n "$branch_prompt" ]; then
    status_icon=$(git_status)
    echo $branch_prompt $status_icon
  fi
}

# Show character if changes are pending
git_status() {
  if current_git_status=$(git status | grep 'added to commit' 2> /dev/null); then
    echo '☠'
  fi
}


# PS1='\u@\h: \w $(git_prompt_info " (%s)")\n'$COLOR_ELECTRIC_YELLOW'⚡ '$COLOR_LIGHT_PURPLE'→ '$COLOR_NONE
PS1='\u@\h: \w $(git_prompt_info " (%s)")\n'$COLOR_ELECTRIC_YELLOW'⚡ '$COLOR_NONE

export PATH=/usr/local/bin:$PATH
# .bash_profile is executed for login shells, while .bashrc is executed for
# interactive non-login shells.
# http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html

if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi