-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bash_profile
74 lines (58 loc) · 1.57 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
alias gco='git checkout'
alias grb='git rebase'
alias gs='git status'
alias ga='git add'
alias gd='git diff'
alias gp='git pull'
alias gpr='git pull --rebase'
alias zs="zeus rspec"
alias zr="zeus rake"
alias ..='cd ..'
alias la='ls -a'
alias ll='ls -al'
alias c='clear'
alias guard='rake db:test:prepare && guard'
alias zake='zeus rake'
alias zspec='zeus rspec'
function mkcd {
if [ ! -n "$1" ]; then
echo "Enter a directory name"
elif [ -d $1 ]; then
echo "\`$1' already exists"
else
mkdir $1 && cd $1
fi
}
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
##commit changes and get args as message
function gg(){
git commit -m "$*"
}
function parse_git_branch {
ref=$( git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/') || return
echo ${ref#refs/heads/}
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
RESET="\[\033[0m\]"
export PS1="[ \W ]$YELLOW\$(parse_git_branch)$GREEN\$$RESET "
export EDITOR=vim
# tell ls to be colourful
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
# tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
export position_in_class="before"
export exclude_tests="true"
#### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
#export PATH=$HOME/local/bin:$PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
source ~/.profile
export PATH=/usr/local/bin:$PATH
eval "$(direnv hook $0)"
alias t='tmux new -s dev'