michael@0: # This file must be used with "source bin/activate.csh" *from csh*. michael@0: # You cannot run it directly. michael@0: # Created by Davide Di Blasi . michael@0: michael@0: alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc' michael@0: michael@0: # Unset irrelevant variables. michael@0: deactivate nondestructive michael@0: michael@0: setenv VIRTUAL_ENV "__VIRTUAL_ENV__" michael@0: michael@0: set _OLD_VIRTUAL_PATH="$PATH" michael@0: setenv PATH "$VIRTUAL_ENV/__BIN_NAME__:$PATH" michael@0: michael@0: michael@0: michael@0: if ("__VIRTUAL_PROMPT__" != "") then michael@0: set env_name = "__VIRTUAL_PROMPT__" michael@0: else michael@0: if (`basename "$VIRTUAL_ENV"` == "__") then michael@0: # special case for Aspen magic directories michael@0: # see http://www.zetadev.com/software/aspen/ michael@0: set env_name = `basename \`dirname "$VIRTUAL_ENV"\`` michael@0: else michael@0: set env_name = `basename "$VIRTUAL_ENV"` michael@0: endif michael@0: endif michael@0: michael@0: # Could be in a non-interactive environment, michael@0: # in which case, $prompt is undefined and we wouldn't michael@0: # care about the prompt anyway. michael@0: if ( $?prompt ) then michael@0: set _OLD_VIRTUAL_PROMPT="$prompt" michael@0: set prompt = "[$env_name] $prompt" michael@0: endif michael@0: michael@0: unset env_name michael@0: michael@0: alias pydoc python -m pydoc michael@0: michael@0: rehash michael@0: