Split PS1 components into .ps1 files.
[profile.git] / .ps1.d / git.ps1
1 #!bash
2
3 # This part of the prompt is taken from git-completion.bashrc.
4 # It is shown only if __ps1_git is 1.  By default it is 0.
5
6 __ps1_git=${__ps1_git:-0}
7 __ps1_git_colour256="0;38;5;33"
8 __ps1_git_colour88="0;38;5;23"
9 __ps1_git_colour="0;36"
10
11 function __ps1_git() {
12   [ "$__ps1_git" = "1" ] || return $1
13   __git_ps1 "$(__ps1_prefix $1 __ps1_git)"'%s'
14   return $1
15 }
16