Do not override "cd" function, use "chpwd" hook instead

This allow the plugin work even w/o using "cd", just by typing
directory's name and hitting Enter
This commit is contained in:
Pavel Puchkin 2012-07-19 12:47:54 +11:00
commit ac8e14f3ed

View file

@ -37,10 +37,8 @@ for wrapsource in "/usr/bin/virtualenvwrapper.sh" "/usr/local/bin/virtualenvwrap
fi fi
} }
# New cd function that does the virtualenv magic # Add hook to chpwd function
function cd { add-zsh-hook chpwd _workon_cwd
builtin cd "$@" && _workon_cwd
}
fi fi
break break