From a55ec58e764ce756b550589b86a2c5e180aac5b8 Mon Sep 17 00:00:00 2001 From: "Patrick W. Healy" Date: Sat, 16 Aug 2025 12:01:58 -0500 Subject: [PATCH] bug(asdf): remove existing shim path entries while prepending to path --- plugins/asdf/asdf.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/asdf/asdf.plugin.zsh b/plugins/asdf/asdf.plugin.zsh index 6b151a393..913949888 100644 --- a/plugins/asdf/asdf.plugin.zsh +++ b/plugins/asdf/asdf.plugin.zsh @@ -2,8 +2,8 @@ export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}" -# Only add to the path if not already present -(($path[(Ie)$ASDF_DATA_DIR/shims])) || 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.