modulecmd: don't show directory of modulefiles

Don't show the full modulefile name for modules outside the Pmodules
hierarchy.
This commit is contained in:
2024-07-12 15:59:46 +02:00
parent 5a4c1234ef
commit 3841f9d0db
+2 -2
View File
@@ -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