From 558ff1399df48c173ed97c9033bcfa4e3234c8ae Mon Sep 17 00:00:00 2001 From: "Patrick W. Healy" Date: Fri, 15 Aug 2025 20:39:06 +0000 Subject: [PATCH] bug(asdf): don't add shims to the path if already present --- 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..6b151a393 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) + +# Only add to the path if not already present +(($path[(Ie)$ASDF_DATA_DIR/shims])) || 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.