File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 7
7
- Switch to stevedore _ for plugin management
8
8
- mkvirtualenv_help should use ``$VIRTUALENVWRAPPER_PYTHON `` instead
9
9
of calling ``virtualenv `` directly (:bbissue: `148 `).
10
+ - Fix issue with lazy-loader code under zsh (:bbissue: `144 `).
10
11
11
12
.. _stevedore : http://pypi.python.org/pypi/stevedore
12
13
Original file line number Diff line number Diff line change 1
- #! /bin/sh
2
1
3
2
test_dir=$( cd $( dirname $0 ) && pwd)
4
3
source " $test_dir /setup.sh"
5
4
6
5
oneTimeSetUp () {
7
6
rm -rf " $WORKON_HOME "
8
7
mkdir -p " $WORKON_HOME "
8
+ [ ! -z " $ZSH_VERSION " ] && unsetopt shwordsplit
9
9
source " $test_dir /../virtualenvwrapper_lazy.sh"
10
+ [ ! -z " $ZSH_VERSION " ] && setopt shwordsplit
10
11
}
11
12
12
13
oneTimeTearDown () {
@@ -22,6 +23,13 @@ function_defined_lazy() {
22
23
name=" $1 "
23
24
assertTrue " $name not defined" " type $name "
24
25
assertTrue " $name does not load virtualenvwrapper" " typeset -f $name | grep 'virtualenvwrapper_load'"
26
+ if [ " $name " = " mkvirtualenv" ]
27
+ then
28
+ lookfor=" rmvirtualenv"
29
+ else
30
+ lookfor=" mkvirtualenv"
31
+ fi
32
+ assertFalse " $name includes reference to $lookfor : $( typeset -f $name ) " " typeset -f $name | grep $lookfor "
25
33
}
26
34
27
35
test_mkvirtualenv_defined_lazy () {
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ function virtualenvwrapper_load {
20
20
# Set up "alias" functions based on the API definition.
21
21
function virtualenvwrapper_setup_lazy_loader {
22
22
typeset venvw_name
23
- for venvw_name in $_VIRTUALENVWRAPPER_API
23
+ for venvw_name in $( echo ${ _VIRTUALENVWRAPPER_API} )
24
24
do
25
25
eval "
26
26
function $venvw_name {
27
27
virtualenvwrapper_load
28
- $venvw_name \"\$ @\"
28
+ ${ venvw_name} \"\$ @\"
29
29
}
30
30
"
31
31
done
You can’t perform that action at this time.
0 commit comments