conf2/zsh/.oh-my-zsh/plugins/asdf/asdf.plugin.zsh

18 lines
427 B
Bash
Raw Normal View History

2019-01-12 15:47:23 +00:00
# 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