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
# In above PS1 we defined following properties | |
# \u@\h \[\033[32m\] — user, host name and its displaying color | |
# \w\[\033[33m\] — current working directory and its displaying color | |
# \$(parse_git_branch)\[\033[00m\] — git branch name and its displaying color | |
# Add the end of the ~/.bashrc file and then run "source ~/.bashrc" command. | |
# For color types "https://gist.github.com/cuneytcorbaci/9b50b0dd679bc6adfc95505fd7f8d958" | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} |
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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |