-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bash_profile
More file actions
51 lines (38 loc) · 1.41 KB
/
.bash_profile
File metadata and controls
51 lines (38 loc) · 1.41 KB
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
export PATH="$HOME/.rbenv/bin:/usr/local/bin:$HOME/bin:$PATH"
eval "$(rbenv init -)"
eval "$(hub alias -s)"
# Tell ls to be colourful
export CLICOLOR=1
export TERM=xterm-color
# Tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
export BUNDLER_EDITOR='/usr/local/bin/subl'
## Git CLI
# export GIT_PS1_SHOWUPSTREAM="auto"
# export GIT_PS1_SHOWDIRTYSTATE="1"
# export GIT_PS1_SHOWUNTRACKEDFILES="1"
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-prompt.sh
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
export PS1="\u@ \W\[\033[32m\]\$(__git_ps1)\[\033[00m\] $ "
alias bpe="subl --wait ~/.bash_profile && source ~/.bash_profile; echo 'Reloaded ~/.bash_profile'"
alias difflist="git diff --name-only `git merge-base origin/master HEAD`"
alias diffedit="(echo '.' && difflist) | xargs subl"
alias la="ls -lahFG"
alias psg="ps aux | grep $@"
### RAILS
alias be="bundle exec"
alias rc="rails console"
alias console="bundle exec rails console"
rt() {
bin/rake test TEST=$1 TESTOPTS="--name=\"/$2/\""
}
alias rr="touch tmp/restart.txt && echo 'app restarted'"
alias rrg="rake routes | grep $@"
alias rdm="bundle exec rake db:migrate"
alias glg="gem list | grep $@"
alias jslint="bundle exec rake test:javascript_lint"
alias resque="QUEUE=* bundle exec rake resque:work"
alias redis="redis-server /usr/local/etc/redis.conf"