No git prompt for my dotfiles.
This commit is contained in:
parent
4e52f28d07
commit
d263b66ca4
12
.bashrc
12
.bashrc
|
@ -95,8 +95,18 @@ PY_BLUE_BG='\e[48;2;53;112;160m'
|
||||||
PY_YELLOW_FG='\e[38;2;255;222;87m'
|
PY_YELLOW_FG='\e[38;2;255;222;87m'
|
||||||
PY_YELLOW_BG='\e[48;2;255;222;87m'
|
PY_YELLOW_BG='\e[48;2;255;222;87m'
|
||||||
|
|
||||||
|
git_prompt()
|
||||||
|
{
|
||||||
|
# Wrapper around __git_ps1
|
||||||
|
# to not show it when the repo is my dotfiles.
|
||||||
|
if [[ "$(git rev-parse --show-toplevel)" != "$HOME" ]]
|
||||||
|
then
|
||||||
|
__git_ps1 "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
PY_PS1='$(python_prompt "${PY_BLUE_FG}🭮${PY_BLUE_BG}${PY_YELLOW_FG} %s \e[0m${PY_BLUE_FG}🭬\e[0m")'
|
PY_PS1='$(python_prompt "${PY_BLUE_FG}🭮${PY_BLUE_BG}${PY_YELLOW_FG} %s \e[0m${PY_BLUE_FG}🭬\e[0m")'
|
||||||
GIT_PS1='$(__git_ps1 "${GIT_RED_FG}🭮${GIT_RED_BG}\e[97m %s \e[0m${GIT_RED_FG}🭬\e[0m")'
|
GIT_PS1='$(git_prompt "${GIT_RED_FG}🭮${GIT_RED_BG}\e[97m %s \e[0m${GIT_RED_FG}🭬\e[0m")'
|
||||||
PS1="${_TITLE}${_PREV_FAIL}${USERNAME_COLOR}\u\e[0m@${HOSTNAME_COLOR}\H\e[0m:\e[32m\w\e[0m${PY_PS1}${GIT_PS1}\n\$ "
|
PS1="${_TITLE}${_PREV_FAIL}${USERNAME_COLOR}\u\e[0m@${HOSTNAME_COLOR}\H\e[0m:\e[32m\w\e[0m${PY_PS1}${GIT_PS1}\n\$ "
|
||||||
|
|
||||||
eval "$(direnv hook bash)"
|
eval "$(direnv hook bash)"
|
||||||
|
|
Loading…
Reference in New Issue