-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_prompt
34 lines (24 loc) · 1.01 KB
/
.bash_prompt
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
32
33
34
#!/usr/bin/env bash
# shellcheck disable=SC2154,SC1091
if [[ -f "${HOMEBREW_PREFIX}/opt/bash-git-prompt/share/gitprompt.sh" ]]; then
export GIT_PROMPT_THEME=Default_NoExitState_Ubuntu
__GIT_PROMPT_DIR=$(brew --prefix)/opt/bash-git-prompt/share
# export GIT_PROMPT_ONLY_IN_REPO=1
export GIT_PROMPT_FETCH_REMOTE_STATUS=0
# export GIT_PROMPT_SHOW_UNTRACKED_FILES=no # no or normal
export GIT_PROMPT_WITH_VIRTUAL_ENV=0
# set k8s prompt
if [[ -f "${HOMEBREW_PREFIX}/opt/kube-ps1/share/kube-ps1.sh" ]]; then
. "${HOMEBREW_PREFIX}/opt/kube-ps1/share/kube-ps1.sh"
export KUBE_PS1_NS_ENABLE=false
export KUBE_PS1_SYMBOL_ENABLE=false
# shellcheck disable=SC2016
export GIT_PROMPT_END=' $(kube_ps1)\n$ '
fi
. "${HOMEBREW_PREFIX}/opt/bash-git-prompt/share/gitprompt.sh"
elif [[ -f "${HOMEBREW_PREFIX}/opt/kube-ps1/share/kube-ps1.sh" ]]; then
. "${HOMEBREW_PREFIX}/opt/kube-ps1/share/kube-ps1.sh"
export KUBE_PS1_NS_ENABLE=false
export KUBE_PS1_SYMBOL_ENABLE=false
PS1='$(kube_ps1) '${PS1}
fi