0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

Add very basic virtualenv plugin

checks for $VIRTUAL_ENV and provides to basename in a function for the prompt.
This commit is contained in:
Justin Caratzas 2012-07-11 23:40:12 -04:00
parent 11034217a7
commit 0b2da8f11b

View file

@ -0,0 +1,9 @@
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