Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
b36c90d9
Unverified
Commit
b36c90d9
authored
Jun 05, 2023
by
Diego Costa R
Committed by
GitHub
Jun 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(autoenv): macOS compatibility, add more dirs (#11724)
Co-authored-by:
Carlo Sala
<
carlosalag@protonmail.com
>
parent
62ab5406
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
autoenv.plugin.zsh
plugins/autoenv/autoenv.plugin.zsh
+12
-4
No files found.
plugins/autoenv/autoenv.plugin.zsh
View file @
b36c90d9
...
@@ -17,9 +17,13 @@ if ! type autoenv_init >/dev/null; then
...
@@ -17,9 +17,13 @@ if ! type autoenv_init >/dev/null; then
/usr/local/bin
/usr/local/bin
/usr/share/autoenv-git
/usr/share/autoenv-git
~/Library/Python/bin
~/Library/Python/bin
.venv/bin
venv/bin
env
/bin
.env/bin
)
)
for
d
(
$install_locations
)
;
do
for
d
(
$install_locations
)
;
do
if
[[
-e
$d
/activate.sh
]]
;
then
if
[[
-e
$d
/activate
||
-e
$d
/activate
.sh
]]
;
then
autoenv_dir
=
$d
autoenv_dir
=
$d
break
break
fi
fi
...
@@ -29,13 +33,13 @@ if ! type autoenv_init >/dev/null; then
...
@@ -29,13 +33,13 @@ if ! type autoenv_init >/dev/null; then
# Look for Homebrew path as a last resort
# Look for Homebrew path as a last resort
if
[[
-z
"
$autoenv_dir
"
]]
&&
((
$+
commands[brew]
))
;
then
if
[[
-z
"
$autoenv_dir
"
]]
&&
((
$+
commands[brew]
))
;
then
d
=
$(
brew
--prefix
)
/opt/autoenv
d
=
$(
brew
--prefix
)
/opt/autoenv
if
[[
-e
$d
/activate.sh
]]
;
then
if
[[
-e
$d
/activate
||
-e
$d
/activate
.sh
]]
;
then
autoenv_dir
=
$d
autoenv_dir
=
$d
fi
fi
fi
fi
# Complain if autoenv is not installed
# Complain if autoenv is not installed
if
[[
-z
$autoenv_dir
]]
;
then
if
[[
-z
$autoenv_dir
]]
;
then
cat
<<
END
>&2
cat
<<
END
>&2
-------- AUTOENV ---------
-------- AUTOENV ---------
Could not locate autoenv installation.
Could not locate autoenv installation.
...
@@ -46,7 +50,11 @@ END
...
@@ -46,7 +50,11 @@ END
return
1
return
1
fi
fi
# Load autoenv
# Load autoenv
source
$autoenv_dir
/activate.sh
if
[[
-e
$autoenv_dir
/activate
]]
;
source
$autoenv_dir
/activate
else
source
$autoenv_dir
/activate.sh
fi
fi
fi
}
}
[[
$?
!=
0
]]
&&
return
$?
[[
$?
!=
0
]]
&&
return
$?
...
...
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