oh-my-zsh/plugins/virtualenv/virtualenv.plugin.zsh
Justin Caratzas 0b2da8f11b Add very basic virtualenv plugin
checks for $VIRTUAL_ENV and provides to basename in a function for the prompt.
2012-07-11 23:40:12 -04:00

10 lines
267 B
Bash

function virtualenv_prompt_info(){
local virtualenv_path="$VIRTUAL_ENV"
if [[ -n $virtualenv_path ]]; then
local virtualenv_name=`basename $virtualenv_path`
printf "%s[%s] " "%{${fg[yellow]}%}" $virtualenv_name
fi
}
export VIRTUAL_ENV_DISABLE_PROMPT=1