ccb0ae57207b1701c3187faf49c417fb0a902f58
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Add quotes to support folders with whitespace
Diff
1diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
2index c40ca86ac8254a5eaa673eb13a58d70c7dc19e75..6cd30732e7be10398f7c747b478e098713785084 100644
3--- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
4+++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
5@@ -38,7 +38,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
6 local WORKON_CWD=1
7 # Check if this is a Git repo
8 local GIT_REPO_ROOT=""
9- local GIT_TOPLEVEL=$(git rev-parse --show-toplevel 2> /dev/null)
10+ local GIT_TOPLEVEL="$(git rev-parse --show-toplevel 2> /dev/null)"
11 if [[ $? == 0 ]]; then
12 GIT_REPO_ROOT="$GIT_TOPLEVEL"
13 fi
14@@ -53,7 +53,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
15 fi
16 # Check for virtualenv name override
17 if [[ -f "$PROJECT_ROOT/.venv" ]]; then
18- ENV_NAME=`cat "$PROJECT_ROOT/.venv"`
19+ ENV_NAME="$(cat "$PROJECT_ROOT/.venv")"
20 elif [[ -f "$PROJECT_ROOT/.venv/bin/activate" ]];then
21 ENV_NAME="$PROJECT_ROOT/.venv"
22 elif [[ "$PROJECT_ROOT" != "." ]]; then