fix(asdf): avoid prepending path entry multiple times (#13268)

This commit is contained in:
Patrick W. Healy
2025-08-16 14:17:14 -05:00
committed by GitHub
parent 51760e1d4a
commit 5d37f723f6

View File

@@ -1,7 +1,9 @@
(( ! $+commands[asdf] )) && return
export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}"
path=("$ASDF_DATA_DIR/shims" $path)
# Add shims to the front of the path, removing if already present.
path=("$ASDF_DATA_DIR/shims" ${path:#$ASDF_DATA_DIR/shims})
# 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.