dd7a89ad7731ca09a3bbbcca711a264751474022

Author
Shaun Garwood <shaun.garwood@gmail.com>
Committer
Shaun Garwood <shaun.garwood@gmail.com>
Date

Message

local var declaration and assignment on seperate lines prevents "no
matches found" bug for zsh 5.0.2

Diff

 1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
 2index 3b0ef5c08f686cfc154abee4d10a493db105f08e..c326e9737427ece4418d95a891a924c1a73f69fb 100644
 3--- a/autoswitch_virtualenv.plugin.zsh
 4+++ b/autoswitch_virtualenv.plugin.zsh
 5@@ -254,7 +254,8 @@ function mkvenv()
 6         printf "Creating ${PURPLE}%s${NONE} virtualenv\n" "$venv_name"
 7 
 8         # Copy parameters variable so that we can mutate it
 9-        local params=("${@[@]}")
10+        local params
11+        params=("${@[@]}")
12 
13         if [[ -n "$AUTOSWITCH_DEFAULT_PYTHON" && ${params[(I)--python*]} -eq 0 ]]; then
14             params+="--python=$AUTOSWITCH_DEFAULT_PYTHON"