mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
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.
9 lines
274 B
Bash
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
|