From 3841f9d0db0a42e975bc8ee1917b79bc1c5a5ec9 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 12 Jul 2024 15:59:46 +0200 Subject: [PATCH] modulecmd: don't show directory of modulefiles Don't show the full modulefile name for modules outside the Pmodules hierarchy. --- Pmodules/modulecmd.bash.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index a40ba82..d202176 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -2104,8 +2104,8 @@ subcommand_list() { human_readable_output(){ # get list of loaded modules with stripped MODULEPATH - IFS=':' read -r -a modules <<< "${LOADEDMODULES}" - + IFS=':' read -r -a modules \ + < <( ${sed} "s;${MODULEPATH//:/\/\\\|}/;;g" <<< "${_LMFILES_}" ) local strs=() local -i n=1 local -i colsize=0