From 679c66cc8303bc0926041a566ec4872c0298be7e Mon Sep 17 00:00:00 2001 From: mail6543210 Date: Thu, 25 Jun 2015 04:45:31 +0800 Subject: [PATCH] Use zsh-builtin parameter expansion instead of `cd -P` --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 9c11c7bbb..5e9b239fe 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -39,7 +39,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then # Look for a proper PROJECT_ROOT path PROJECT_ROOT=`pwd` while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do - PROJECT_ROOT=$(cd -P "$PROJECT_ROOT/.."; pwd) + PROJECT_ROOT=${PROJECT_ROOT:A:h} done if [[ "$PROJECT_ROOT" == "/" ]]; then PROJECT_ROOT="."