Last active
March 20, 2020 17:27
-
-
Save alfredobarron/5fa8c83b467966c11b7991ded41e172d to your computer and use it in GitHub Desktop.
Show branch into Mac Terminal --> 1. nano ~/.bash_profile 2. Edit file 3. source ~/.bash_profile
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
if [ $PWD == $HOME ] | |
then | |
cd Code | |
fi | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\w\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment