Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Lib/venv/scripts/common/activate
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ deactivate () {
fi

unset VIRTUAL_ENV
unset VIRTUAL_ENV_PROMPT
if [ ! "$1" = "nondestructive" ] ; then
# Self destruct!
unset -f deactivate
Expand Down Expand Up @@ -55,8 +56,10 @@ fi
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
if [ "x__VENV_PROMPT__" != x ] ; then
PS1="__VENV_PROMPT__${PS1:-}"
VIRTUAL_ENV_PROMPT="__VENV_PROMPT__"
PS1="__VENV_PROMPT__${PS1:-}"
else
VIRTUAL_ENV_PROMPT="`basename \"$VIRTUAL_ENV\"`"
if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
# special case for Aspen magic directories
# see http://www.zetadev.com/software/aspen/
Expand All @@ -65,6 +68,7 @@ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
fi
fi
export VIRTUAL_ENV_PROMPT
export PS1
fi

Expand Down