asdf.fish 372 B

123456789101112131415
  1. #!/usr/bin/env fish
  2. set -l asdf_dir (dirname (status -f))
  3. set -l asdf_data_dir (
  4. if test -n "$ASDF_DATA_DIR"; echo $ASDF_DATA_DIR;
  5. else; echo $HOME/.asdf; end)
  6. # Add asdf to PATH
  7. set -l asdf_bin_dirs $asdf_dir/bin $asdf_dir/shims $asdf_data_dir/shims
  8. for x in $asdf_bin_dirs
  9. if begin not contains $x $PATH; and test -d $x; end
  10. set -gx PATH $x $PATH
  11. end
  12. end