Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 # This file must be used with "source bin/activate.csh" *from csh*.
2 # You cannot run it directly.
3 # Created by Davide Di Blasi <davidedb@gmail.com>.
5 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'
7 # Unset irrelevant variables.
8 deactivate nondestructive
10 setenv VIRTUAL_ENV "__VIRTUAL_ENV__"
12 set _OLD_VIRTUAL_PATH="$PATH"
13 setenv PATH "$VIRTUAL_ENV/__BIN_NAME__:$PATH"
17 if ("__VIRTUAL_PROMPT__" != "") then
18 set env_name = "__VIRTUAL_PROMPT__"
19 else
20 if (`basename "$VIRTUAL_ENV"` == "__") then
21 # special case for Aspen magic directories
22 # see http://www.zetadev.com/software/aspen/
23 set env_name = `basename \`dirname "$VIRTUAL_ENV"\``
24 else
25 set env_name = `basename "$VIRTUAL_ENV"`
26 endif
27 endif
29 # Could be in a non-interactive environment,
30 # in which case, $prompt is undefined and we wouldn't
31 # care about the prompt anyway.
32 if ( $?prompt ) then
33 set _OLD_VIRTUAL_PROMPT="$prompt"
34 set prompt = "[$env_name] $prompt"
35 endif
37 unset env_name
39 alias pydoc python -m pydoc
41 rehash