From fe1ab6d35cc8863d1c4c84660817bf6f88795fb5 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Wed, 15 Jan 2020 13:01:41 +0100 Subject: [PATCH] bugfix: broken sub-cmd unload fixed --- Pmodules/modulecmd.bash.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index b91da3e..5319f01 100755 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -594,11 +594,14 @@ subcommand_unload() { for arg in "${args[@]}"; do local output=$("${modulecmd}" "${Shell}" 'unload' "${arg}") eval "${output}" - if [[ "${Shell}" == "bash" ]]; then + case ${Shell} in + sh | bash | zsh ) echo "${output}" - else + ;; + * ) "${modulecmd}" "${Shell}" 'unload' "${arg}" - fi + ;; + esac done }