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

set -gx MODULESHOME /usr/share/lmod/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_cmd $argv | source -
end

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