Last active
November 27, 2016 19:52
-
-
Save shortcircuit3/434e2379d79809588b22 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
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
## git completion (run brew install bash-completion first) | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
## branch name in prompt | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' | |
} | |
function proml { | |
local GREEN="\[\033[0;32m\]" | |
local DEFAULT="\[\033[0m\]" | |
local CYAN="\[\033[1;36m\]" | |
local RED="\[\033[1;31m\]" | |
PS1="$CYAN\n\W\$(parse_git_branch)$RED\n➤ $DEFAULT" | |
} | |
proml | |
# Add git completion installed via homebrew. | |
source /usr/local/etc/bash_completion.d/git-completion.bash | |
alias py='python' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment