asdf.plugin.zsh 427 Bytes
Newer Older
1
# Find where asdf should be installed
Rob Loach's avatar
Rob Loach committed
2
3
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"

4
5
6
# If not found, check for Homebrew package
if [[ ! -d $ASDF_DIR ]] && (( $+commands[brew] )); then
   ASDF_DIR="$(brew --prefix asdf)"
Rob Loach's avatar
Rob Loach committed
7
fi
8

9
10
11
12
13
14
15
16
# 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
17
fi