asdf.plugin.zsh 451 B

12345678910111213
  1. (( ! $+commands[asdf] )) && return
  2. export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}"
  3. path=("$ASDF_DATA_DIR/shims" $path)
  4. # If the completion file doesn't exist yet, we need to autoload it and
  5. # bind it to `asdf`. Otherwise, compinit will have already done that.
  6. if [[ ! -f "$ZSH_CACHE_DIR/completions/_asdf" ]]; then
  7. typeset -g -A _comps
  8. autoload -Uz _asdf
  9. _comps[asdf]=_asdf
  10. fi
  11. asdf completion zsh >| "$ZSH_CACHE_DIR/completions/_asdf" &|