From a08078b1c133480323bc054e40c000fb3270fc84 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 9 Dec 2021 17:54:23 +0100 Subject: [PATCH] modulecmd: bugfix in printing overlay info replacing overlay weren't handled correct --- Pmodules/modulecmd.bash.in | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 4e20a23..51cdd4b 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1376,14 +1376,20 @@ subcommand_use() { std::info "\t${flag}" done - local overlay std::info '' std::info "Used overlays:" - for overlay in "${OverlayList[@]}"; do - local hiding='' - [[ "${OverlayDict[${overlay}]}" == "${ol_hiding}" ]] && \ - hiding=' (hiding)' - std::info "\t${overlay}${hiding}" + local ol_dir + for ol_dir in "${OverlayList[@]}"; do + local txt='' + case "${OverlayDict[${ol_dir}]}" in + "${ol_hiding}" ) + txt=' (hiding modules with same name)' + ;; + "${ol_replacing}" ) + txt=' (replacing groups)' + ;; + esac + std::info "\t${ol_dir}${txt}" done std::info ''