1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2025-09-20 01:36:15 +08:00

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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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.