mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
fix(asdf): avoid prepending path entry multiple times (#13268)
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
(( ! $+commands[asdf] )) && return
|
(( ! $+commands[asdf] )) && return
|
||||||
|
|
||||||
export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}"
|
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
|
# 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.
|
# bind it to `asdf`. Otherwise, compinit will have already done that.
|
||||||
|
|||||||
Reference in New Issue
Block a user