-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_profile
68 lines (52 loc) · 1.51 KB
/
bash_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# default editor
export EDITOR='vim'
# optimize ruby garbage collector
RUBY_HEAP_MIN_SLOTS=600000
RUBY_GC_MALLOC_LIMIT=59000000
RUBY_HEAP_FREE_MIN=100000
# colors to ls
export CLICOLOR=1
# history
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
export HISTCONTROL=ignoreboth
export HISTFILESIZE=10000000000
export HISTSIZE=1000000
shopt -s histappend
# git stuff for prompt
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWSTASHSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWUPSTREAM=true
# add path to projects in cd
export CDPATH=".:~:~/Dropbox/projects:~/Projects"
# add local bin in path
export PATH=/usr/local/bin:$PATH
# load aliases
export DOTFILES=$HOME/.dotfiles
source $DOTFILES/aliases
# bash completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
# rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# prompt
build_ps1() {
local blue='\[\e[0;34m\]'
local red='\[\e[0;31m\]'
local yellow='\[\e[0;33m\]'
local reset='\[\e[00m\]'
local green='\[\e[0;32m\]'
local bred='\[\e[1;31m\]'
local bwhite='\[\e[1;0m\]'
local git_ps1=$bred'$(__git_ps1 "(%s)")'
local pwd_ps1=$blue"\W"
local prompt_ps1="$([[ ${EUID} == 0 ]] && echo $red'#' || echo $green'$')"
export PS1="$pwd_ps1$git_ps1 $prompt_ps1 $reset"
}; build_ps1
# use sessions in terminal
TERM=xterm; export TERM
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export CC=/usr/bin/gcc
export PATH="/usr/local/sbin:$PATH"