Created
April 1, 2014 21:36
-
-
Save jgautsch/9923673 to your computer and use it in GitHub Desktop.
.bashrc and .bash_profile, RVM troubles
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
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
# Load in .bashrc ----------------------------------------------- | |
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* |
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
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
# Turn on advanced bash completion if the file exists | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
### git branch showing in prompt | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function color_my_prompt { | |
local __user_and_host="\[\033[01;32m\]\u@\h" | |
# local __cur_location="\[\033[01;34m\]\w" | |
# local __cur_location="\[\033[01;32m\]./\W" | |
local __cur_location="\[\033[01;32m\]" | |
local __git_branch_color="\[\033[31m\]" | |
#local __git_branch="\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`" | |
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`' | |
# local __prompt_tail="\[\033[35m\]$" | |
local __prompt_tail="\[\033[34m\]$" | |
local __last_color="\[\033[00m\]" | |
# export PS1="$__user_and_host $__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color " | |
export PS1="$__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color " | |
# export PS1="$__git_branch_color$__git_branch$__prompt_tail$__last_color " | |
} | |
color_my_prompt | |
alias c='clear' | |
alias serve='python -m SimpleHTTPServer' | |
# Set CLICOLOR if you want Ansi Colors in iTerm2 | |
export CLICOLOR=1 | |
# Set colors to match iTerm2 Terminal Colors | |
export TERM=xterm-256color | |
export PATH="./bin:$PATH" | |
### Added by the Heroku Toolbelt | |
export PATH="/usr/local/heroku/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment