mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-02-26 15:30:20 +08:00
feat(asdf): support asdf v0.16 ahead
Co-authored-by: Valgard Trontheim <github@trontheim.de> Closes #12964 Closes #12967
This commit is contained in:
parent
db32c6ccce
commit
4d9d346718
@ -1,3 +1,21 @@
|
|||||||
|
if (( $+commands[asdf] )); then
|
||||||
|
export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||||
|
path=("$ASDF_DATA_DIR/shims" $path)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
fi
|
||||||
|
asdf completion zsh >| "$ZSH_CACHE_DIR/completions/_asdf" &|
|
||||||
|
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# TODO:(2025-02-12): remove deprecated asdf <0.16 code
|
||||||
|
|
||||||
# Find where asdf should be installed
|
# Find where asdf should be installed
|
||||||
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
|
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
|
||||||
ASDF_COMPLETIONS="$ASDF_DIR/completions"
|
ASDF_COMPLETIONS="$ASDF_DIR/completions"
|
||||||
|
Loading…
Reference in New Issue
Block a user