checks for $VIRTUAL_ENV and provides to basename in a function for the prompt.master
parent
11034217a7
commit
0b2da8f11b
1 changed files with 9 additions and 0 deletions
@ -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 |
||||
Loading…
Reference in new issue