Skip to content

Commit 1db25a4

Browse files
committed
Add list of commands as basic help output
Add a 'virtualenvwrapper' command to print a list of the wrapper commands and a one-liner description. Based on a contribution by Eugene Sajine. Change-Id: I441ce2576ff3ad7bb8cc5812b5898ba04ad65637
1 parent 664aee2 commit 1db25a4

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

docs/source/command_ref.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,3 +586,19 @@ virtualenv.
586586
Syntax::
587587

588588
wipeenv
589+
590+
591+
==============
592+
Other Commands
593+
==============
594+
595+
.. _command-virtualenvwrapper:
596+
597+
virtualenvwrapper
598+
-----------------
599+
600+
Print a list of commands and their descriptions as basic help output.
601+
602+
Syntax::
603+
604+
virtualenvwrapper

docs/source/history.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Release History
33
===============
44

5+
dev
6+
===
7+
8+
- Add :ref:`command-virtualenvwrapper` to print basic help and a list
9+
of commands.
10+
511
4.2
612
===
713

virtualenvwrapper.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,60 @@ function allvirtualenv {
12141214
done
12151215
}
12161216

1217+
function virtualenvwrapper {
1218+
cat <<EOF
1219+
1220+
virtualenvwrapper is a set of extensions to Ian Bicking's virtualenv
1221+
tool. The extensions include wrappers for creating and deleting
1222+
virtual environments and otherwise managing your development workflow,
1223+
making it easier to work on more than one project at a time without
1224+
introducing conflicts in their dependencies.
1225+
1226+
For more information please refer to the documentation:
1227+
1228+
http://virtualenvwrapper.readthedocs.org/en/latest/command_ref.html
1229+
1230+
Commands available:
1231+
1232+
add2virtualenv: Adds the specified directories to the Python
1233+
path for the currently-active virtualenv.
1234+
allvirtualenv: Run a command in all virtualenvs under
1235+
\$WORKON_HOME
1236+
cdproject: Change the current working directory to the
1237+
one specified as the project directory for
1238+
the active virtualenv.
1239+
cdsitepackages: Change the current working directory to the
1240+
site-packages for \$VIRTUAL_ENV.
1241+
cdvirtualenv: Change the current working directory to
1242+
\$VIRTUAL_ENV
1243+
cpvirtualenv: Duplicate an existing virtualenv environment.
1244+
deactivate: Switch from a virtual environment to the
1245+
system-installed version of Python
1246+
lssitepackages: Shows the content of the site-packages directory
1247+
of the currently-active virtualenv
1248+
lsvirtualenv: List all virtual environments, use -h for more
1249+
info
1250+
mkproject: Create a new virtualenv in the \$WORKON_HOME and
1251+
project directory in \$PROJECT_HOME
1252+
mktmpenv: Create a new temporary virtualenv in the
1253+
\$WORKON_HOME directory with a generated name
1254+
mkvirtualenv: Create a new environment, in the \$WORKON_HOME,
1255+
use -h for more info.
1256+
rmvirtualenv: Remove an environment
1257+
setvirtualenvproject: Bind an existing virtualenv to an existing
1258+
project.
1259+
showvirtualenv: Show the details for a single virtualenv
1260+
toggleglobalsitepackages: Controls whether the active virtualenv will
1261+
access the packages in the global
1262+
Python site-packages directory.
1263+
virtualenvwrapper: Prints this help message
1264+
wipeenv: Remove all of the installed third-party
1265+
packages in the current virtualenv.
1266+
workon: List or change working virtual environments
1267+
1268+
EOF
1269+
}
1270+
12171271
#
12181272
# Invoke the initialization functions
12191273
#

0 commit comments

Comments
 (0)