Pushes autoenv code to its plugin.
Sources the activate.sh file or informs the user, that its not
available.
Overriding the cd function, as it was formerly done, is not needed
anymore, activate.sh does this by itself.
Diff
1diff --git a/plugins/autoenv/autoenv.plugin.zsh b/plugins/autoenv/autoenv.plugin.zsh
2index ca5666979cd7de508643295b7625835643847e8a..a8271849e3004255b2acb29b6cdefa089e917ddb 100644
3--- a/plugins/autoenv/autoenv.plugin.zsh
4+++ b/plugins/autoenv/autoenv.plugin.zsh
5@@ -1,6 +1,17 @@
6+# Activates autoenv or reports its failure
7+if ! source $HOME/.autoenv/activate.sh 2>/dev/null; then
8+ echo '-------- AUTOENV ---------'
9+ echo 'Could not find ~/.autoenv/activate.sh.'
10+ echo 'Please check if autoenv is correctly installed.'
11+ echo 'In the meantime the autoenv plugin is DISABLED.'
12+ echo '--------------------------'
13+ return 1
14+fi
15+
16 # The use_env call below is a reusable command to activate/create a new Python
17 # virtualenv, requiring only a single declarative line of code in your .env files.
18 # It only performs an action if the requested virtualenv is not the current one.
19+
20 use_env() {
21 typeset venv
22 venv="$1"