Skip to content

Instantly share code, notes, and snippets.

@gotar
Created November 8, 2013 11:44
Show Gist options
  • Save gotar/7369880 to your computer and use it in GitHub Desktop.
Save gotar/7369880 to your computer and use it in GitHub Desktop.
.bash_profile
export EDITOR=mvim
alias l='ls'
alias g='git'
alias sl='shelly list'
alias sc='shelly console'
alias e='mvim'
alias bers='bundle exec rspec'
ll () {
ls -lah "${1-.}" | grep "^d" && ls -lah "${1-.}" | grep "^-" && ls -lah "${1-.}" | grep -v -E "^d|^-|^total"
}
# Set git branch into prompt
git_prompt () {
if ! git rev-parse --git-dir > /dev/null 2>&1; then
return 0
fi
git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
echo " [$git_branch]"
}
PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;31m\]$(git_prompt) \[\033[01;34m\]\$\[\033[00m\] '
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
__git_complete g __git_main
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment