-
-
Save mikebob/925579 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export PS1="\u@\W[\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)]: " | |
# For those of us who occasionally forget to change their branches | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. | |
# Example | |
# user@directory[branch]: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment