From 04eea80f35e76b5ee13c1bf20303c6211a76ae38 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 11 Jun 2019 16:11:15 +0200 Subject: [PATCH] output group in load hints, if the user has to 'load' this group first --- Pmodules/modulecmd.bash.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index b076617..e0ff75d 100755 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -336,6 +336,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