Last active
August 29, 2015 13:58
-
-
Save shortcircuit3/9967271 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
## 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\]/' | |
} | |
## Add git completion installed via homebrew. | |
source /usr/local/etc/bash_completion.d/git-completion.bash | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment