Is it possible to display the name of the branch in this place?
How is this done in git bash for windows?
Is it possible to display the name of the branch in this place?
How is this done in git bash for windows?
If you have bash-completion you can add $(__git_ps1)
, if you use "
you need to escape the command substitution.
# change these if you don't dig my colors!
NM="\[\033[0;1;37m\]" #means no background and white lines
HI="\[\033[0;37m\]" #change this for letter colors
SI="\[\033[38;5;202m\]" #this is for the current directory
GI="\[\033[38;5;220m\]" # Git branch color
NI="\[\033[0;1;30m\]" #for @ symbol
IN="\[\033[0m\]"
PS1="${NM}[${HI}\u${NI}@${HI}\h ${SI}\w\$(__git_ps1 ' ${NM}(${GI}%s${NM})')${NM}]: ${IN}"