-
Notifications
You must be signed in to change notification settings - Fork 0
Other notes
_gage edited this page Jan 12, 2022
·
2 revisions
This bash code runs the git branch command and parses the output for branch name and folder location The PS1 environment variable is updated to uses this information `
parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^]/d' -e 's/ (.*)/ (\1)/' }
export PS1="\u@\h [\033[32m]\w[\033[33m]$(parse_git_branch)[\033[00m] $ " `