-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_profile
98 lines (76 loc) · 2.17 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export PATH="/Users/ageorges/.cabal/bin:$PATH"
export PATH="/Users/ageorges/bin:$PATH"
export EDITOR=vim
#node
export NODE_PATH="/usr/local/lib/node_modules"
export NPM_CONFIG_PREFIX="/usr/local"
# rbenv
export RBENV_ROOT=/usr/local/var/rbenv
export PATH="$RBENV_ROOT/bin:$PATH"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# haskell
# export PATH="$HOME/.cabal/bin:$PATH"
# java
export JAVA_OPTS="-Djava.awt.headless=true"
if [[ -r /usr/local/bin/virtualenvwrapper.sh ]]; then
source /usr/local/bin/virtualenvwrapper.sh
fi
alias ll="ls -l -a -t -h"
alias st='open -a "Sublime Text" .'
alias clean-branches='git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d'
alias rev-parse="git rev-parse HEAD | cut -c1-6"
# show git info in prompt
function git-branch-name {
echo $(git symbolic-ref HEAD 2>/dev/null | awk -F/ {'print $NF'})
}
function git-dirty {
st=$(git status 2>/dev/null | tail -n 1)
if [[ $st != "nothing to commit, working directory clean" ]]
then
echo "*"
fi
}
function gitify {
status=$(git status 2>/dev/null | tail -n 1)
if [[ $status == "" ]]
then
echo ""
else
echo "(${BLUE}$(git-branch-name)$(git-dirty)${RESET})"
fi
}
function virtualenvify {
if [[ -n $VIRTUAL_ENV ]]
then
echo "(${GREEN}${VIRTUAL_ENV##*/}${RESET})"
elif [[ -n $HSENV ]]
then
echo "(${GREEN}${HSENV##*/}${RESET})"
else
echo ""
fi
}
function make-prompt {
local GRAY="\[\e[1;30m\]"
local PURPLE="\[\e[0;35m\]"
local BLUE="\[\e[0;34m\]"
local YELLOW="\[\e[0;33m\]"
local GREEN="\[\e[0;32m\]"
local RESET="\[\e[0m\]"
PS1="${GRAY}\w${RESET}$(virtualenvify)$(gitify)${YELLOW}\n∞${RESET} "
}
PROMPT_COMMAND=make-prompt
make-prompt
export CLICOLOR=1
export LSCOLORS=exfxcxdxbxegedabagacad
export HISTFILESIZE=1000
export HISTTIMEFORMAT="%F %T "
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
if which grunt > /dev/null; then eval "$(grunt --completion=bash)"; fi
function serve { python -m SimpleHTTPServer "$@" ;}
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"