1 # This file must be used with "source bin/activate" *from bash*
2 # you cannot run it directly
5 # reset old environment variables
6 if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
7 PATH="${_OLD_VIRTUAL_PATH:-}"
9 unset _OLD_VIRTUAL_PATH
11 if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
12 PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
14 unset _OLD_VIRTUAL_PYTHONHOME
17 # This should detect bash and zsh, which have a hash command that must
18 # be called to get it to forget past commands. Without forgetting
19 # past commands the $PATH changes we made may not be respected
20 if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
24 if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
25 PS1="${_OLD_VIRTUAL_PS1:-}"
27 unset _OLD_VIRTUAL_PS1
31 unset VIRTUAL_ENV_PROMPT
32 if [ ! "${1:-}" = "nondestructive" ] ; then
38 # unset irrelevant variables
39 deactivate nondestructive
41 VIRTUAL_ENV="/home/crepu/.emacs.d/elpy/rpc-venv"
44 _OLD_VIRTUAL_PATH="$PATH"
45 PATH="$VIRTUAL_ENV/bin:$PATH"
48 # unset PYTHONHOME if set
49 # this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
50 # could use `if (set -u; : $PYTHONHOME) ;` in bash
51 if [ -n "${PYTHONHOME:-}" ] ; then
52 _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
56 if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
57 _OLD_VIRTUAL_PS1="${PS1:-}"
58 PS1="(rpc-venv) ${PS1:-}"
60 VIRTUAL_ENV_PROMPT="(rpc-venv) "
61 export VIRTUAL_ENV_PROMPT
64 # This should detect bash and zsh, which have a hash command that must
65 # be called to get it to forget past commands. Without forgetting
66 # past commands the $PATH changes we made may not be respected
67 if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then