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
# Function to parse the current git branch | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p' | |
} | |
# Color settings | |
COLOR_DEF='\e[0m' | |
COLOR_USR='\e[38;5;243m' | |
COLOR_DIR='\e[38;5;197m' | |
COLOR_GIT='\e[38;5;39m' |
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
function parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1="\h:\w \u\$(parse_git_branch)$ " |