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
05713785
Commit
05713785
authored
Aug 07, 2018
by
John Burwell
Committed by
Marc Cornellà
Aug 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asdf: add Homebrew and completion support (#6749)
* Modifies the search logic for asdf to include Homebrew when it is installed. The implementation is adapted from the pyenv plugin.
parent
91b77191
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
asdf.plugin.zsh
plugins/asdf/asdf.plugin.zsh
+12
-7
No files found.
plugins/asdf/asdf.plugin.zsh
View file @
05713785
# Find where asdf should be installed
.
# Find where asdf should be installed
ASDF_DIR
=
"
${
ASDF_DIR
:-
$HOME
/.asdf
}
"
ASDF_DIR
=
"
${
ASDF_DIR
:-
$HOME
/.asdf
}
"
#
Load asdf, if found.
#
If not found, check for Homebrew package
if
[
-f
$ASDF_DIR
/asdf.sh
]
;
then
if
[
[
!
-d
$ASDF_DIR
]]
&&
((
$+
commands[brew]
))
;
then
.
$ASDF_DIR
/asdf.sh
ASDF_DIR
=
"
$(
brew
--prefix
asdf
)
"
fi
fi
# Load asdf completions, if found.
# Load command
if
[
-f
$ASDF_DIR
/completions/asdf.bash
]
;
then
if
[[
-f
"
$ASDF_DIR
/asdf.sh"
]]
;
then
.
$ASDF_DIR
/completions/asdf.bash
.
"
$ASDF_DIR
/asdf.sh"
# Load completions
if
[[
-f
"
$ASDF_DIR
/completions/asdf.bash"
]]
;
then
.
"
$ASDF_DIR
/completions/asdf.bash"
fi
fi
fi
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