Skip to content

Commit 73a624e

Browse files
authored
Merge pull request #27 from dhellmann/11-drop-ksh-support
drop ksh support
2 parents f1d6cea + d736549 commit 73a624e

File tree

7 files changed

+14
-28
lines changed

7 files changed

+14
-28
lines changed

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Supported Shells
4747
================
4848

4949
virtualenvwrapper is a set of shell *functions* defined in Bourne
50-
shell compatible syntax. It is tested under ``bash``, ``ksh``, and
50+
shell compatible syntax. It is tested under ``bash`` and
5151
``zsh``. It may work with other shells, so if you find that it does
5252
work with a shell not listed here please let us know by opening a
5353
`ticket on GitHub

docs/source/install.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ shell compatible syntax. Its automated tests run under these
1212
shells on OS X and Linux:
1313

1414
* ``bash``
15-
* ``ksh``
1615
* ``zsh``
1716

1817
It may work with other shells, so if you find that it does work with a
19-
shell not listed here please let me know. If you can modify it to
18+
shell not listed here please let us know. If you can modify it to
2019
work with another shell without completely rewriting it, then send a pull
2120
request through the `GitHub project page`_. If you write a clone to
22-
work with an incompatible shell, let me know and I will link to it
21+
work with an incompatible shell, let us know and we will link to it
2322
from this page.
2423

2524
.. _GitHub project page: https://GitHub.com/python-virtualenvwrapper/virtualenvwrapper/

docs/source/plugins.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ techniques.
8080

8181
The API is the same for every extension point. Each uses a Python
8282
function that takes a single argument, a list of strings passed to the
83-
hook loader on the command line.
83+
hook loader on the command line.
8484

8585
::
8686

@@ -106,7 +106,7 @@ user scripts when ``virtualenvwrapper.sh`` is loaded.
106106
def initialize(args):
107107
for filename, comment in GLOBAL_HOOKS:
108108
make_hook(os.path.join('$WORKON_HOME', filename), comment)
109-
return
109+
return
110110

111111
.. _plugins-user-env:
112112

@@ -150,13 +150,13 @@ shell process.
150150
.. warning::
151151

152152
virtualenvwrapper works under several shells with slightly
153-
different syntax (bash, sh, zsh, ksh). Take this portability into
153+
different syntax (bash, sh, zsh). Take this portability into
154154
account when defining source hooks. Sticking to the simplest
155155
possible syntax usually avoids problems, but there may be cases
156156
where examining the ``SHELL`` environment variable to generate
157157
different syntax for each case is the only way to achieve the
158158
desired result.
159-
159+
160160
Registering Entry Points
161161
------------------------
162162

@@ -200,9 +200,9 @@ application, use the ``-m`` option to the interpreter::
200200

201201
$ python -m virtualenvwrapper.hook_loader -h
202202
Usage: virtualenvwrapper.hook_loader [options] <hook> [<arguments>]
203-
203+
204204
Manage hooks for virtualenvwrapper
205-
205+
206206
Options:
207207
-h, --help show this help message and exit
208208
-s, --source Print the shell commands to be run in the current
@@ -213,7 +213,7 @@ application, use the ``-m`` option to the interpreter::
213213
-q, --quiet Show less information on the console
214214
-n NAMES, --name=NAMES
215215
Only run the hook from the named plugin
216-
216+
217217
To run the extensions for the initialize hook::
218218

219219
$ python -m virtualenvwrapper.hook_loader -v initialize
@@ -375,7 +375,7 @@ Plugins that define new operations can also define new extension
375375
points. No setup needs to be done to allow the hook loader to find
376376
the extensions; documenting the names and adding calls to
377377
``virtualenvwrapper_run_hook`` is sufficient to cause them to be
378-
invoked.
378+
invoked.
379379

380380
The hook loader assumes all extension point names start with
381381
``virtualenvwrapper.`` and new plugins will want to use their own

tests/run_tests

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ do
6161
echo " SHELL=$SHELL"
6262
echo " BASH_VERSION=$BASH_VERSION"
6363
echo " ZSH_VERSION=$ZSH_VERSION"
64-
echo " KSH_VERSION=$KSH_VERSION"
6564
echo " virtualenv=$(which virtualenv)"
6665
echo " test_shell_opts=$test_shell_opts"
6766
echo " ZSH=$ZSH_NAME $ZSH_EVAL_CONTEXT"

tests/test_dir_stack.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ tearDown() {
2929
}
3030

3131
test_ticket_101 () {
32-
[ ! -z "$KSH_VERSION" ] && echo "Skipping test under ksh" && return 0
3332
mkvirtualenv some_env
3433
deactivate
3534
cd "$WORKON_HOME/start_here"

tox.ini

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ setenv =
1414
allowlist_externals =
1515
bash
1616
zsh
17-
ksh
1817

1918
[testenv:fast]
2019
setenv =
@@ -32,12 +31,6 @@ setenv =
3231
test_shell_opts = -o shwordsplit
3332
commands = zsh -o shwordsplit ./tests/run_tests {envdir} []
3433

35-
[testenv:ksh]
36-
basepython=python2.7
37-
setenv =
38-
SHELL = /bin/ksh
39-
commands = ksh ./tests/run_tests {envdir} []
40-
4134
[testenv:docs]
4235
deps =
4336
-r{toxinidir}/requirements.txt

virtualenvwrapper.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,16 @@ fi
121121
# alias or even a shell function. Under bash and zsh, "builtin" forces
122122
# the use of a command that is part of the shell itself instead of an
123123
# alias, function, or external command, while "command" does something
124-
# similar but allows external commands. Under ksh "builtin" registers
125-
# a new command from a shared library, but "command" will pick up
126-
# existing builtin commands. We need to use a builtin for cd because
127-
# we are trying to change the state of the current shell, so we use
128-
# "builtin" for bash and zsh but "command" under ksh.
124+
# similar but allows external commands. We need to use a builtin for
125+
# cd because we are trying to change the state of the current shell,
126+
# so we use "builtin".
129127
function virtualenvwrapper_cd {
130128
if [ -n "${BASH:-}" ]
131129
then
132130
builtin \cd "$@"
133131
elif [ -n "${ZSH_VERSION:-}" ]
134132
then
135133
builtin \cd -q "$@"
136-
else
137-
command \cd "$@"
138134
fi
139135
}
140136

0 commit comments

Comments
 (0)