diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index d4e0552..98b2e49 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -385,6 +385,10 @@ subcommand_load() { if [[ ! ":${UsedReleases}:" =~ "${release}" ]]; then output+="module use ${release}; " fi + local group=${line[2]} + if [[ ! ":${UsedGroups}:" =~ ":${group}:" ]]; then + output+="module use ${group}; " + fi output+="module load ${line[@]:3} ${line[0]}\n" done < <(subcommand_search "${m}" -a --no-header 2>&1) if [[ -n "${output}" ]]; then