From 5d37f723f6c92d9fe043ea9f0aa460cd0bd0258a Mon Sep 17 00:00:00 2001 From: "Patrick W. Healy" Date: Sat, 16 Aug 2025 14:17:14 -0500 Subject: [PATCH] fix(asdf): avoid prepending path entry multiple times (#13268) --- plugins/asdf/asdf.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/asdf/asdf.plugin.zsh b/plugins/asdf/asdf.plugin.zsh index 318267dcb..913949888 100644 --- a/plugins/asdf/asdf.plugin.zsh +++ b/plugins/asdf/asdf.plugin.zsh @@ -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.