2025-03-29 17:47:03 +08:00
|
|
|
(( ! $+commands[asdf] )) && return
|
2025-02-13 03:15:25 +08:00
|
|
|
|
2025-03-29 17:47:03 +08:00
|
|
|
export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}"
|
|
|
|
path=("$ASDF_DATA_DIR/shims" $path)
|
2025-02-13 03:15:25 +08:00
|
|
|
|
2025-03-29 17:47:03 +08:00
|
|
|
# If the completion file doesn't exist yet, we need to autoload it and
|
|
|
|
# bind it to `asdf`. Otherwise, compinit will have already done that.
|
|
|
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_asdf" ]]; then
|
|
|
|
typeset -g -A _comps
|
|
|
|
autoload -Uz _asdf
|
|
|
|
_comps[asdf]=_asdf
|
2018-04-23 02:27:12 +08:00
|
|
|
fi
|
2025-03-29 17:47:03 +08:00
|
|
|
asdf completion zsh >| "$ZSH_CACHE_DIR/completions/_asdf" &|
|