2023-03-30 00:27:23 -07:00
|
|
|
if test -z $ASDF_DIR
|
|
|
|
set ASDF_DIR (realpath (dirname (status filename)))
|
2022-04-21 06:40:43 -07:00
|
|
|
end
|
2023-03-30 00:27:23 -07:00
|
|
|
set --export ASDF_DIR $ASDF_DIR
|
2020-08-11 16:11:24 -07:00
|
|
|
|
2023-03-30 00:27:23 -07:00
|
|
|
set -l _asdf_bin "$ASDF_DIR/bin"
|
|
|
|
if test -z $ASDF_DATA_DIR
|
|
|
|
set _asdf_shims "$HOME/.asdf/shims"
|
2022-08-30 08:18:25 -07:00
|
|
|
else
|
2023-03-30 00:27:23 -07:00
|
|
|
set _asdf_shims "$ASDF_DATA_DIR/shims"
|
|
|
|
end
|
2016-04-18 00:33:14 -07:00
|
|
|
|
2023-03-30 00:27:23 -07:00
|
|
|
# Do not use fish_add_path (added in Fish 3.2) because it
|
|
|
|
# potentially changes the order of items in fish_user_paths
|
|
|
|
if not contains $_asdf_bin $fish_user_paths
|
|
|
|
set --global --prepend fish_user_paths $_asdf_bin
|
|
|
|
end
|
|
|
|
if not contains $_asdf_shims $fish_user_paths
|
|
|
|
set --global --prepend fish_user_paths $_asdf_shims
|
2018-03-28 21:49:40 -07:00
|
|
|
end
|
2023-03-30 00:27:23 -07:00
|
|
|
set --erase _asdf_bin _asdf_shims
|
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
|