summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/asdf/asdf.plugin.zsh4
1 files changed, 3 insertions, 1 deletions
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.