fix(asdf): avoid prepending path entry multiple times (#13268)
Diff
1diff --git a/plugins/asdf/asdf.plugin.zsh b/plugins/asdf/asdf.plugin.zsh
2index 318267dcbbb95279296efe0dc49a80488ae6969d..9139498888a1c9f06a781485abbce3c80225cb1d 100644
3--- a/plugins/asdf/asdf.plugin.zsh
4+++ b/plugins/asdf/asdf.plugin.zsh
5@@ -1,7 +1,9 @@
6 (( ! $+commands[asdf] )) && return
7 8 export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}"
9-path=("$ASDF_DATA_DIR/shims" $path)
10+
11+# Add shims to the front of the path, removing if already present.
12+path=("$ASDF_DATA_DIR/shims" ${path:#$ASDF_DATA_DIR/shims})
1314 # If the completion file doesn't exist yet, we need to autoload it and
15 # bind it to `asdf`. Otherwise, compinit will have already done that.