Created
August 29, 2018 06:47
-
-
Save gtallen1187/60f02243c7f01687857d87c44e19ee44 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
# TERMINAL PROMPT | |
# Git branch script from http://martinfitzpatrick.name/article/add-git-branch-name-to-terminal-prompt-mac | |
# Custom bash prompt via kirsle.net/wizards/ps1.html | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\[$(tput bold)\]\[$(tput setaf 5)\]⌘ \[$(tput setaf 6)\]\w\[$(tput setaf 3)\]\$(parse_git_branch) \[$(tput sgr0)\]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment