summaryrefslogtreecommitdiff
path: root/plugins/asdf/asdf.plugin.zsh
blob: 75395c718a0c40627bbe523852de1d9a80fe44b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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