Statistics
| Branch: | Revision:

root / env / bin / activate.csh @ 1a305335

History | View | Annotate | Download (1.02 KB)

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>.
4

    
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'
6

    
7
# Unset irrelavent variables.
8
deactivate nondestructive
9

    
10
setenv VIRTUAL_ENV "/home/officers/tooltron/env"
11

    
12
set _OLD_VIRTUAL_PATH="$PATH"
13
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
14

    
15
set _OLD_VIRTUAL_PROMPT="$prompt"
16

    
17
if ("" != "") then
18
    set env_name = ""
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
28
set prompt = "[$env_name] $prompt"
29
unset env_name
30

    
31
rehash
32