forked from andywhite37/virtualenv.tcsh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
44 lines (30 loc) · 1.32 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
-------------------------------------------------------------------------------
Python virtualenv activation and deactivation scripts for tcsh
-------------------------------------------------------------------------------
By default, these scripts assume that they have been be copied into ~/bin/,
but this can be customized if necessary.
To run these scripts, navigate to your virtualenv root directory, and run:
source ~/bin/activate.tcsh
or:
source ~/bin/deactivate.tcsh
You can alternatively run:
source ~/bin/activate.tcsh /path/to/virtualenv/root
to activate a virtualenv from anywhere.
Note: these scripts do not mess with the prompt. Scripts assume that the prompt is properly
handled in the .tcshrc file (using VIRTUAL_ENV environment variable).
Here is an example for setting up the prompt to show the current VIRTUAL_ENV:
set black = '%{\033[30m%}'
set red = '%{\033[31m%}'
set green = '%{\033[32m%}'
set yellow = '%{\033[33m%}'
set blue = '%{\033[34m%}'
set magenta = '%{\033[35m%}'
set cyan = '%{\033[36m%}'
set white = '%{\033[37m%}'
set nocolor = '%{\033[0m%}'
if ( $?VIRTUAL_ENV ) then
set VESTR = `basename $VIRTUAL_ENV`
else
set VESTR = "-- NONE --"
endif
set prompt = "[${red}%n@%m${nocolor}][${green}${VESTR}${nocolor}][${cyan}%~${nocolor}][${yellow}%h${nocolor}]>%b "