2022-04-21 06:40:43 -07:00
|
|
|
if not set -q ASDF_DIR
|
|
|
|
set -x ASDF_DIR (dirname (status -f))
|
|
|
|
end
|
2020-08-11 16:11:24 -07:00
|
|
|
|
2020-08-12 06:12:22 -07:00
|
|
|
set -l asdf_user_shims (
|
|
|
|
if test -n "$ASDF_DATA_DIR"
|
2021-11-18 03:05:27 -07:00
|
|
|
printf "%s\n" "$ASDF_DATA_DIR/shims"
|
2020-08-12 06:12:22 -07:00
|
|
|
else
|
2021-11-18 03:05:27 -07:00
|
|
|
printf "%s\n" "$HOME/.asdf/shims"
|
2020-08-12 06:12:22 -07:00
|
|
|
end
|
|
|
|
)
|
2016-04-18 00:33:14 -07:00
|
|
|
|
2018-10-31 13:12:39 -07:00
|
|
|
# Add asdf to PATH
|
2021-05-21 09:03:06 -07:00
|
|
|
set -l asdf_bin_dirs $ASDF_DIR/bin $asdf_user_shims
|
2016-04-18 00:33:14 -07:00
|
|
|
|
2018-10-31 13:12:39 -07:00
|
|
|
for x in $asdf_bin_dirs
|
2019-07-22 16:44:32 -07:00
|
|
|
if test -d $x
|
|
|
|
for i in (seq 1 (count $PATH))
|
|
|
|
if test $PATH[$i] = $x
|
|
|
|
set -e PATH[$i]
|
|
|
|
break
|
|
|
|
end
|
|
|
|
end
|
2019-04-08 01:11:13 -07:00
|
|
|
end
|
2019-07-22 16:44:32 -07:00
|
|
|
set PATH $x $PATH
|
2018-03-28 21:49:40 -07:00
|
|
|
end
|
2019-03-09 10:30:31 -07:00
|
|
|
|
2019-11-27 01:24:29 -07:00
|
|
|
# Load the asdf wrapper function
|
2021-05-21 09:03:06 -07:00
|
|
|
. $ASDF_DIR/lib/asdf.fish
|