asdf/asdf.fish

28 lines
511 B
Fish
Raw Normal View History

2019-01-24 12:42:58 -07:00
set -x ASDF_DIR (dirname (status -f))
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
# 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
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
end
# Load the asdf wrapper function
2021-05-21 09:03:06 -07:00
. $ASDF_DIR/lib/asdf.fish