Skip to content

Instantly share code, notes, and snippets.

@gabrieljoelc
Created July 10, 2014 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrieljoelc/bca99fa447f0e13b7f29 to your computer and use it in GitHub Desktop.
Save gabrieljoelc/bca99fa447f0e13b7f29 to your computer and use it in GitHub Desktop.
My OS X .bash_profile
export PATH=/usr/local/bin:$PATH
export PATH="$HOME/.rbenv/bin:$PATH"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PATH="$HOME/bin:$PATH"
export PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin:$PATH"
source ~/.git-prompt.sh
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
function __git_prompt {
GIT_PS1_SHOWDIRTYSTATE=1
__git_ps1 " %s" | sed 's/ \([+*]\{1,\}\)$/\1/'
}
# Only show username@server over SSH.
function __name_and_server {
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
echo "`whoami`@`hostname -s` "
fi
}
bash_prompt() {
# regular colors
local K="\[\033[0;30m\]" # black
local R="\[\033[0;31m\]" # red
local G="\[\033[0;32m\]" # green
local Y="\[\033[0;33m\]" # yellow
local B="\[\033[0;34m\]" # blue
local M="\[\033[0;35m\]" # magenta
local C="\[\033[0;36m\]" # cyan
local W="\[\033[0;37m\]" # white
# emphasized (bolded) colors
local BK="\[\033[1;30m\]"
local BR="\[\033[1;31m\]"
local BG="\[\033[1;32m\]"
local BY="\[\033[1;33m\]"
local BB="\[\033[1;34m\]"
local BM="\[\033[1;35m\]"
local BC="\[\033[1;36m\]"
local BW="\[\033[1;37m\]"
# reset
local RESET="\[\033[0;37m\]"
PS1="\t $BY\$(__name_and_server)$Y\W$G\$(__git_prompt)$RESET$ "
}
bash_prompt
unset bash_prompt
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
alias sss='foreman start -f Procfile.dev'
alias rcon='rails console'
export PATH=/Applications/Postgres.app/Contents/Versions/9.3/bin:/Users/gabrieljoelc/bin:/Users/gabrieljoelc/.rbenv/shims:/Users/gabrieljoelc/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment