mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 09:58:47 -07:00
Merge pull request #4440 from apjanke/autoenv-homebrew
autoenv: support homebrew-installed autoenv
This commit is contained in:
commit
0be21f025e
@ -1,12 +1,25 @@
|
|||||||
# Activates autoenv or reports its failure
|
# Activates autoenv or reports its failure
|
||||||
if ! source $HOME/.autoenv/activate.sh 2>/dev/null; then
|
() {
|
||||||
echo '-------- AUTOENV ---------'
|
if ! type autoenv_init >/dev/null; then
|
||||||
echo 'Could not find ~/.autoenv/activate.sh.'
|
for d (~/.autoenv /usr/local/opt/autoenv); do
|
||||||
echo 'Please check if autoenv is correctly installed.'
|
if [[ -e $d/activate.sh ]]; then
|
||||||
echo 'In the meantime the autoenv plugin is DISABLED.'
|
autoenv_dir=$d
|
||||||
echo '--------------------------'
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ -z $autoenv_dir ]]; then
|
||||||
|
cat <<END >&2
|
||||||
|
-------- AUTOENV ---------
|
||||||
|
Could not locate autoenv installation.
|
||||||
|
Please check if autoenv is correctly installed.
|
||||||
|
In the meantime the autoenv plugin is DISABLED.
|
||||||
|
--------------------------
|
||||||
|
END
|
||||||
return 1
|
return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
[[ $? != 0 ]] && return $?
|
||||||
|
|
||||||
# The use_env call below is a reusable command to activate/create a new Python
|
# The use_env call below is a reusable command to activate/create a new Python
|
||||||
# virtualenv, requiring only a single declarative line of code in your .env files.
|
# virtualenv, requiring only a single declarative line of code in your .env files.
|
||||||
|
Loading…
Reference in New Issue
Block a user