forked from cf-container-networking/c2c-workspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git-prompt-colors.sh
31 lines (25 loc) · 1 KB
/
git-prompt-colors.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
override_git_prompt_colors() {
GIT_PROMPT_THEME_NAME="Custom"
GIT_DUET_INITIALS="\$(echo \$(git config --get-regexp ^duet.env.git-.*-name | sed -e 's/^.*-name //' | tr 'A-Z' 'a-z' | sed -e 's/\([a-z]\)[^ +]*./\1/g' ) | sed -e 's/ /+/')"
GIT_PAIR=${GIT_DUET_INITIALS:-`git config user.initials | sed 's% %+%'`}
DateTime="\$(date +'%Y-%m-%d %H:%M')"
CfTarget="\$(cf-target)"
GoBoshTarget="\$(gobosh_target_prompt)"
Ochre="\033[38;5;95m"
GIT_PROMPT_START_USER="\n${Ochre}bosh: ${GoBoshTarget} | cf: ${CfTarget} (\h) ${ResetColor}\n${Yellow}${PathShort}${ResetColor}"
GIT_PROMPT_END_USER=" ${Cyan}${GIT_PAIR}${ResetColor}\n$ "
GIT_PROMPT_END_ROOT="\n# "
GIT_PROMPT_PREFIX="|"
GIT_PROMPT_SUFFIX="|"
GIT_PROMPT_SEPARATOR=" "
#GIT_PROMPT_BRANCH="${Magenta}"
GIT_PROMPT_STAGED="${Green}S:"
GIT_PROMPT_CONFLICTS="${Red}C:"
GIT_PROMPT_CHANGED="${Blue}U:"
GIT_PROMPT_UNTRACKED="${Red}?:"
}
gobosh_target_prompt() {
basename "${BOSH_ENV}"
}
# load the theme
reload_git_prompt_colors "Custom"