ohmyzsh/plugins/virtualenv/virtualenv.plugin.zsh
Richard Maynard cd42812c9b fix virtualenv's with virtualenv plugin / prompt display
Virtual Env modifies the prompt in such a way that when used with
agnoster the virtualenv will be displayed twice.

Using the virtualenv oh-my-zsh plugin disables this behavior (simply
because it disables the virtual env prompt mangling) however when using
the plugin it would be nice to keep the single prompt display as
expected, and still allow for the function to provide prompt info which
other themes may use.
2013-11-06 13:06:22 -06:00

9 lines
274 B
Bash

function virtualenv_prompt_info(){
if [[ -n $VIRTUAL_ENV ]]; then
printf "%s[%s] " "%{${fg[yellow]}%}" ${${VIRTUAL_ENV}:t}
fi
}
# disables prompt mangling in virtual_env/bin/activate
export VIRTUAL_ENV_DISABLE_PROMPT=1
export VIRTUAL_ENV_DISABLE_PROMPT_BY_PLUGIN=1