23
23
#
24
24
25
25
# Make sure there is a default value for WORKON_HOME.
26
+ # You can override this setting in your .bashrc.
26
27
if [ "$WORKON_HOME" = "" ]
27
28
then
28
29
export WORKON_HOME="$HOME/.virtualenvs"
@@ -38,13 +39,17 @@ function verify_workon_home () {
38
39
return 0
39
40
}
40
41
41
- # Function to create a new environment, in the WORKON_HOME.
42
+ # Create a new environment, in the WORKON_HOME.
43
+ #
44
+ # Usage: mkvirtualenv [options] ENVNAME
45
+ # (where the options are passed directly to virtualenv)
46
+ #
42
47
function mkvirtualenv () {
43
48
verify_workon_home
44
49
(cd "$WORKON_HOME"; virtualenv $*)
45
50
}
46
51
47
- # Function to remove an environment, in the WORKON_HOME.
52
+ # Remove an environment, in the WORKON_HOME.
48
53
function rmvirtualenv () {
49
54
typeset env_name="$1"
50
55
verify_workon_home
@@ -57,13 +62,16 @@ function rmvirtualenv () {
57
62
rm -rf "$env_dir"
58
63
}
59
64
60
- # Function to list the available environments.
65
+ # List the available environments.
61
66
function show_workon_options () {
62
67
verify_workon_home
63
68
ls "$WORKON_HOME" | egrep -v '*.egg' | sort
64
69
}
65
70
66
- # Function to list or change working virtual environments
71
+ # List or change working virtual environments
72
+ #
73
+ # Usage: workon [environment_name]
74
+ #
67
75
function workon () {
68
76
typeset env_name="$1"
69
77
if [ "$env_name" = "" ]
0 commit comments