Remove update_prompt file
This commit is contained in:
parent
751797bf22
commit
afb06e4f70
|
@ -1,30 +0,0 @@
|
||||||
source .git-completion.bash
|
|
||||||
source .git-prompt.sh
|
|
||||||
export PYENV_VIRTUALENV_DISABLE_PROMPT=1 # Remove, simulating future behaviour
|
|
||||||
|
|
||||||
function updatePrompt {
|
|
||||||
|
|
||||||
# Styles
|
|
||||||
GREEN='\[\e[0;32m\]'
|
|
||||||
BLUE='\[\e[0;34m\]'
|
|
||||||
RESET='\[\e[0m\]'
|
|
||||||
|
|
||||||
# Base prompt: \W = working dir
|
|
||||||
PROMPT="${GREEN}\h${RESET} ${BLUE}\W${RESET}"
|
|
||||||
|
|
||||||
# Current Git repo
|
|
||||||
if type "__git_ps1" > /dev/null 2>&1; then
|
|
||||||
PROMPT="$PROMPT$(__git_ps1 "${BLUE}(%s)${RESET}")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Current pyenv version if not system
|
|
||||||
if [[ $(pyenv version-name) != "system" ]]; then
|
|
||||||
PROMPT="$PROMPT${BLUE}{$(pyenv version-name)}${RESET}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
PS1="$PROMPT\$ "
|
|
||||||
}
|
|
||||||
export -f updatePrompt
|
|
||||||
|
|
||||||
# Bash shell executes this function just before displaying the PS1 variable
|
|
||||||
export PROMPT_COMMAND='updatePrompt'
|
|
Loading…
Reference in a new issue