Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
0be21f02
Commit
0be21f02
authored
Oct 09, 2015
by
Robby Russell
Browse files
Merge pull request #4440 from apjanke/autoenv-homebrew
autoenv: support homebrew-installed autoenv
parents
01448020
c146853a
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/autoenv/autoenv.plugin.zsh
View file @
0be21f02
# Activates autoenv or reports its failure
if
!
source
$HOME
/.autoenv/activate.sh 2>/dev/null
;
then
echo
'-------- AUTOENV ---------'
echo
'Could not find ~/.autoenv/activate.sh.'
echo
'Please check if autoenv is correctly installed.'
echo
'In the meantime the autoenv plugin is DISABLED.'
echo
'--------------------------'
return
1
()
{
if
!
type
autoenv_init
>
/dev/null
;
then
for
d
(
~/.autoenv /usr/local/opt/autoenv
)
;
do
if
[[
-e
$d
/activate.sh
]]
;
then
autoenv_dir
=
$d
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
fi
fi
}
[[
$?
!=
0
]]
&&
return
$?
# 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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment