Skip to content

Instantly share code, notes, and snippets.

@SyNeto
Created November 5, 2018 18:12
Show Gist options
  • Save SyNeto/9afe0962c7f2d1ddf3e890c08f187cce to your computer and use it in GitHub Desktop.
Save SyNeto/9afe0962c7f2d1ddf3e890c08f187cce to your computer and use it in GitHub Desktop.
Minimal theme bash-it
#!/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