Last active
April 21, 2019 15:49
-
-
Save claytantor/cf525ffe375e8fabae7d40260f11ff4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update_PS1 () { | |
VENV_PROMPT="(${VIRTUAL_ENV##*/})" | |
if [ $VENV_PROMPT == "()" ]; then | |
VENV_PROMPT="" | |
fi | |
PS1="\[$(tput bold)\]\[\033[38;5;214m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;76m\]@\[$(tput sgr0)\]\[\033[38;5;82m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;226m\]\W\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]" | |
PS1="$PS1$(__git_ps1 "\[\e[32m\][%s]\[\e[0m\]") $VENV_PROMPT $ " | |
} | |
shopt -u promptvars | |
PROMPT_COMMAND=update_PS1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment