forked from daviddavis/dotfiles
/
bash_profile
34 lines (27 loc) · 1.16 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
# aliases
alias s="script/server -u"
alias sp="script/server RAILS_ENV=production"
alias sc="script/console"
alias ll="ls -al"
alias sl="tail -f -n 30 log/development.log"
alias pg_start="sudo su postgres -c \"pg_ctl start -D /opt/local/var/db/postgresql84/data\""
alias g="git"
alias gs="git svn"
alias rf="rm -rf"
# alias rs="cd /Users/davidd/Sites/robertson_scholars"
# mkdir, cd into it
mkcd () {
mkdir -p "$*"
cd "$*"
}
# add mysql bin to path
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
# add postgres in there too
export PATH=/usr/local/Cellar/postgresql/8.4.4:$PATH
export SVN_EDITOR="mvim"
# command prompt
export PROMPT_COMMAND='PS1="\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`\u@\h:\`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\` %\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"'
# let's tell our shell to use rvm for davidd
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# rebind Ctrl-p to go to the beginning of line since Ctrl-a is used for tmux/screen
bind '"\C-p": beginning-of-line'