Created
November 5, 2018 18:12
-
-
Save SyNeto/9afe0962c7f2d1ddf3e890c08f187cce to your computer and use it in GitHub Desktop.
Minimal theme bash-it
This file contains hidden or 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
#!/usr/bin/env bash | |
SCM_THEME_PROMPT_PREFIX="${cyan}(${green}" | |
SCM_THEME_PROMPT_SUFFIX="${cyan})" | |
SCM_THEME_PROMPT_DIRTY=" ${red}✗" | |
SCM_THEME_PROMPT_CLEAN=" ${green}✓" | |
# Get Virtual Env | |
prompt() { | |
if [[ $VIRTUAL_ENV != "" ]] | |
then | |
# Strip out the path and just leave the env name | |
venv=" ${orange}[${VIRTUAL_ENV##*/}]" | |
else | |
# In case you don't have one activated | |
venv='' | |
fi | |
PS1="$(scm_prompt_info)${reset_color} ${cyan}\w${venv}${reset_color}\n> " | |
PS1="${venv}${reset_color} ${cyan}\w $(scm_prompt_info)${reset_color}\n> " | |
} | |
safe_append_prompt_command prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment