7373fi
7474
7575# Verify that the WORKON_HOME directory exists
76- function virtualenvwrapper_verify_workon_home () {
76+ virtualenvwrapper_verify_workon_home () {
7777 if [ ! -d " $WORKON_HOME " ]
7878 then
7979 [ " $1 " != " -q" ] && echo " ERROR: Virtual environments directory '$WORKON_HOME ' does not exist. Create it or set WORKON_HOME to an existing directory." >&2
@@ -85,7 +85,7 @@ function virtualenvwrapper_verify_workon_home () {
8585# HOOK_VERBOSE_OPTION="-v"
8686
8787# Run the hooks
88- function virtualenvwrapper_run_hook () {
88+ virtualenvwrapper_run_hook () {
8989 # First anything that runs directly from the plugin
9090 " $VIRTUALENVWRAPPER_PYTHON " -m virtualenvwrapper.hook_loader $HOOK_VERBOSE_OPTION " $@ "
9191 # Now anything that wants to run inside this shell
@@ -96,15 +96,15 @@ function virtualenvwrapper_run_hook () {
9696}
9797
9898# Set up virtualenvwrapper properly
99- function virtualenvwrapper_initialize () {
99+ virtualenvwrapper_initialize () {
100100 virtualenvwrapper_verify_workon_home -q || return 1
101101 virtualenvwrapper_run_hook " initialize"
102102}
103103
104104virtualenvwrapper_initialize
105105
106106# Verify that virtualenv is installed and visible
107- function virtualenvwrapper_verify_virtualenv () {
107+ virtualenvwrapper_verify_virtualenv () {
108108 venv=$( which virtualenv | grep -v " not found" )
109109 if [ " $venv " = " " ]
110110 then
@@ -120,7 +120,7 @@ function virtualenvwrapper_verify_virtualenv () {
120120}
121121
122122# Verify that the requested environment exists
123- function virtualenvwrapper_verify_workon_environment () {
123+ virtualenvwrapper_verify_workon_environment () {
124124 typeset env_name=" $1 "
125125 if [ ! -d " $WORKON_HOME /$env_name " ]
126126 then
@@ -131,7 +131,7 @@ function virtualenvwrapper_verify_workon_environment () {
131131}
132132
133133# Verify that the active environment exists
134- function virtualenvwrapper_verify_active_environment () {
134+ virtualenvwrapper_verify_active_environment () {
135135 if [ ! -n " ${VIRTUAL_ENV} " ] || [ ! -d " ${VIRTUAL_ENV} " ]
136136 then
137137 echo " ERROR: no virtualenv active, or active virtualenv is missing" >&2
@@ -145,7 +145,7 @@ function virtualenvwrapper_verify_active_environment () {
145145# Usage: mkvirtualenv [options] ENVNAME
146146# (where the options are passed directly to virtualenv)
147147#
148- function mkvirtualenv () {
148+ mkvirtualenv () {
149149 eval " envname=\$ $# "
150150 virtualenvwrapper_verify_workon_home || return 1
151151 virtualenvwrapper_verify_virtualenv || return 1
@@ -163,7 +163,7 @@ function mkvirtualenv () {
163163}
164164
165165# Remove an environment, in the WORKON_HOME.
166- function rmvirtualenv () {
166+ rmvirtualenv () {
167167 typeset env_name=" $1 "
168168 virtualenvwrapper_verify_workon_home || return 1
169169 if [ " $env_name " = " " ]
@@ -184,7 +184,7 @@ function rmvirtualenv () {
184184}
185185
186186# List the available environments.
187- function virtualenvwrapper_show_workon_options () {
187+ virtualenvwrapper_show_workon_options () {
188188 virtualenvwrapper_verify_workon_home || return 1
189189 # NOTE: DO NOT use ls here because colorized versions spew control characters
190190 # into the output list.
@@ -197,7 +197,7 @@ function virtualenvwrapper_show_workon_options () {
197197#
198198# Usage: workon [environment_name]
199199#
200- function workon () {
200+ workon () {
201201 typeset env_name=" $1 "
202202 if [ " $env_name " = " " ]
203203 then
@@ -232,7 +232,7 @@ function workon () {
232232 virtualenvwrapper_saved_deactivate=$( typeset -f deactivate)
233233
234234 # Replace the deactivate() function with a wrapper.
235- eval ' function deactivate () {
235+ eval ' deactivate () {
236236 # Call the local hook before the global so we can undo
237237 # any settings made by the local postactivate first.
238238 virtualenvwrapper_run_hook "pre_deactivate"
@@ -288,12 +288,12 @@ elif [ -n "$ZSH_VERSION" ] ; then
288288fi
289289
290290# Prints the Python version string for the current interpreter.
291- function virtualenvwrapper_get_python_version () {
291+ virtualenvwrapper_get_python_version () {
292292 python -c ' import sys; print ".".join(str(p) for p in sys.version_info[:2])'
293293}
294294
295295# Prints the path to the site-packages directory for the current environment.
296- function virtualenvwrapper_get_site_packages_dir () {
296+ virtualenvwrapper_get_site_packages_dir () {
297297 echo " $VIRTUAL_ENV /lib/python` virtualenvwrapper_get_python_version` /site-packages"
298298}
299299
@@ -308,7 +308,7 @@ function virtualenvwrapper_get_site_packages_dir () {
308308# "virtualenv_path_extensions.pth" inside the virtualenv's
309309# site-packages directory; if this file does not exist, it will be
310310# created first.
311- function add2virtualenv () {
311+ add2virtualenv () {
312312
313313 virtualenvwrapper_verify_workon_home || return 1
314314 virtualenvwrapper_verify_active_environment || return 1
@@ -350,23 +350,23 @@ function add2virtualenv () {
350350
351351# Does a ``cd`` to the site-packages directory of the currently-active
352352# virtualenv.
353- function cdsitepackages () {
353+ cdsitepackages () {
354354 virtualenvwrapper_verify_workon_home || return 1
355355 virtualenvwrapper_verify_active_environment || return 1
356356 site_packages=" ` virtualenvwrapper_get_site_packages_dir` "
357357 cd " $site_packages " /$1
358358}
359359
360360# Does a ``cd`` to the root of the currently-active virtualenv.
361- function cdvirtualenv () {
361+ cdvirtualenv () {
362362 virtualenvwrapper_verify_workon_home || return 1
363363 virtualenvwrapper_verify_active_environment || return 1
364364 cd $VIRTUAL_ENV /$1
365365}
366366
367367# Shows the content of the site-packages directory of the currently-active
368368# virtualenv
369- function lssitepackages () {
369+ lssitepackages () {
370370 virtualenvwrapper_verify_workon_home || return 1
371371 virtualenvwrapper_verify_active_environment || return 1
372372 site_packages=" ` virtualenvwrapper_get_site_packages_dir` "
@@ -382,7 +382,7 @@ function lssitepackages () {
382382}
383383
384384# Duplicate the named virtualenv to make a new one.
385- function cpvirtualenv() {
385+ cpvirtualenv () {
386386
387387 typeset env_name=" $1 "
388388 if [ " $env_name " = " " ]
0 commit comments