Last active
April 13, 2016 15:29
-
-
Save 0x1mason/be42c0280c01029ed8d02eb7052523c9 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
function getBranch { | |
git symbolic-ref --short HEAD 2> /dev/null | |
if [ $? == 0 ] && [ `git rev-parse --is-inside-work-tree`==true ]; then | |
echo "(`git symbolic-ref --short HEAD`)" | |
fi | |
} | |
function setPrompt { | |
GIT_EXEC_PATH=/c/tools/cmder/vendor/git-for-windows/mingw64/ | |
COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}" | |
COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}" | |
COMPLETION_PATH="$COMPLETION_PATH/share/git/completion" | |
source "$COMPLETION_PATH/git-completion.bash" | |
source "$COMPLETION_PATH/git-prompt.sh" | |
PS1="\[\033[01;34m\]\w \[\033[33m\]" | |
PS1="$PS1"$'`echo $(getBranch)`' | |
PS1="$PS1"$'\n\[\033[1;39m\]$BM_REGION:\[\033[1;31m\]$BM_APP\[\033[39m\]' | |
# Prompt end | |
PS1="$PS1"$' ❱❱\[\033[00m\] ' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment