overriding cd seems fraught with peril. Perhaps you can just add the below to the documentation
function precmd() {
if [[ -z $VIRTHUALENV_NAME ]]; then
if [[ -e .virthualenv/bin/activate ]]; then
source .virthualenv/bin/activate
fi
fi
PROMPT="...$VIRTHUALENV_NAME..."
}
overriding cd seems fraught with peril. Perhaps you can just add the below to the documentation