Skip to content

Commit 0d2648c

Browse files
authored
A different approach
1 parent e227c3c commit 0d2648c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

asdf.fish

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ set -l asdf_data_dir (
99
set -l asdf_bin_dirs $ASDF_DIR/bin $ASDF_DIR/shims $asdf_data_dir/shims
1010

1111
for x in $asdf_bin_dirs
12-
if test -d $x; and not contains $x $PATH
13-
set PATH $x $PATH
12+
if test -d $x
13+
for i in (seq 1 (count $PATH))
14+
if test $PATH[$i] = $x
15+
set -e PATH[$i]
16+
break
17+
end
18+
end
1419
end
20+
set PATH $x $PATH
1521
end
1622

1723
# Add function wrapper so we can export variables

0 commit comments

Comments
 (0)