mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-26 09:43:47 +01:00
05713785b0
* Modifies the search logic for asdf to include Homebrew when it is installed. The implementation is adapted from the pyenv plugin.
18 lines
427 B
Bash
18 lines
427 B
Bash
# Find where asdf should be installed
|
|
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
|
|
|
|
# If not found, check for Homebrew package
|
|
if [[ ! -d $ASDF_DIR ]] && (( $+commands[brew] )); then
|
|
ASDF_DIR="$(brew --prefix asdf)"
|
|
fi
|
|
|
|
# Load command
|
|
if [[ -f "$ASDF_DIR/asdf.sh" ]]; then
|
|
. "$ASDF_DIR/asdf.sh"
|
|
|
|
# Load completions
|
|
if [[ -f "$ASDF_DIR/completions/asdf.bash" ]]; then
|
|
. "$ASDF_DIR/completions/asdf.bash"
|
|
fi
|
|
fi
|