Last active
November 8, 2017 17:34
-
-
Save mhoffman/5df55afc0fd730d5b0c41f582302fa6e 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
# Show bash prompt with timer information | |
# and git branch | |
export GIT_PS1_SHOWDIRTYSTATE=true | |
export export GIT_PS1_SHOWSTASHSTATE=true | |
# set a fancy prompt | |
declare -F | grep __git_ps1 > /dev/null | |
if [ "$?" -eq 0 ] | |
then | |
echo ${platform} | |
export PS1='[dt: ${timer_show}s] \[\033[01;32m\]\u@\h\[\033[01;34m\]:\w\[\033[31m\]$(__git_ps1 "(%s)")\[\033[01;34m\]$\[\033[00m\] ' | |
else | |
if [[ ${platform} == 'mac' ]]; then | |
export PS1='[dt: ${timer_show}s] \[\033[01;32m\]\u@\h\[\033[01;34m\]:\w\[\033[31m\]$(parse_git_branch)\[\033[01;34m\]$\[\033[00m\] ' | |
else | |
export PS1='[dt: ${timer_show}s] \[\033[01;32m\]\u@\h\[\033[01;34m\]:\w\[\033[31m\]\[\033[01;34m\]$\[\033[00m\] ' | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment