Last active
December 17, 2015 02:09
-
-
Save aenain/5533723 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default PS1 | |
default_ps1="\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]" | |
# By default on Mac OSX ls's output is without colours. | |
alias ls='ls -G' | |
GOLIATH_PORT=9201 | |
alias goliath="/etc/init.d/goliath_$GOLIATH_PORT" | |
alias redis='redis-server /usr/local/etc/redis.conf' | |
alias postgres_ctl='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log' | |
alias postgres.start='postgres_ctl start' | |
alias postgres.stop='postgres_ctl stop' | |
alias postgres.status='postgres_ctl status' | |
alias mongod='/opt/mongodb/bin/mongod --dbpath ~/mongodb' | |
alias mongo='/opt/mongodb/bin/mongo' # e.g. adtaily_development as first argument | |
# Some rack-based applications can use default gems from their gem path, but some require other versions | |
# and then it's required to use bundle exec. | |
alias be='bundle exec' | |
# rbenv | |
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
# GIT | |
[ -f ~/.git-bash-completion.sh ] && . ~/.git-bash-completion.sh | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
git_branch_ps1="$default_ps1\$(parse_git_branch)$ " | |
export PS1=$git_branch_ps1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment