set -gx LMOD_PKG /usr/share/lmod/lmod
set -gx LMOD_DIR /usr/share/lmod/lmod/libexec
set -gx LMOD_DIR /usr/share/lmod/lmod/libexec
set -gx LMOD_CMD /usr/share/lmod/lmod/libexec/lmod

if status -i
   function module
      eval $LMOD_CMD fish $argv | source -
   end
else
   function module
      eval $LMOD_CMD --no_redirect fish $argv | source -
   end
end

function ml
   eval $LMOD_DIR/ml $argv | source -
end

function clearMT
   eval $LMOD_DIR/clearMT_cmd bash | source -
end
