Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export VIRTUAL_ENV_DISABLE_PROMPT=1
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="💩"
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="💩"
function virtualenv_prompt_info() {
if [ -n "$VIRTUAL_ENV" ]; then
if [ -f "$VIRTUAL_ENV/__name__" ]; then
local name=`cat $VIRTUAL_ENV/__name__`
elif [ `basename $VIRTUAL_ENV` = "__" ]; then
local name=$(basename $(dirname $VIRTUAL_ENV))
else
local name=$(basename $VIRTUAL_ENV)
fi
echo "$fg[yellow]$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX $name $ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX$reset_color $fg[red] ⇝ $reset_color"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.